Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * SSM2602 SPI audio driver
0004  *
0005  * Copyright 2014 Analog Devices Inc.
0006  */
0007 
0008 #include <linux/module.h>
0009 #include <linux/spi/spi.h>
0010 #include <linux/regmap.h>
0011 
0012 #include <sound/soc.h>
0013 
0014 #include "ssm2602.h"
0015 
0016 static int ssm2602_spi_probe(struct spi_device *spi)
0017 {
0018     return ssm2602_probe(&spi->dev, SSM2602,
0019         devm_regmap_init_spi(spi, &ssm2602_regmap_config));
0020 }
0021 
0022 static const struct of_device_id ssm2602_of_match[] = {
0023     { .compatible = "adi,ssm2602", },
0024     { }
0025 };
0026 MODULE_DEVICE_TABLE(of, ssm2602_of_match);
0027 
0028 static struct spi_driver ssm2602_spi_driver = {
0029     .driver = {
0030         .name   = "ssm2602",
0031         .of_match_table = ssm2602_of_match,
0032     },
0033     .probe      = ssm2602_spi_probe,
0034 };
0035 module_spi_driver(ssm2602_spi_driver);
0036 
0037 MODULE_DESCRIPTION("ASoC SSM2602 SPI driver");
0038 MODULE_AUTHOR("Cliff Cai");
0039 MODULE_LICENSE("GPL");