This source file includes following definitions.
- aic23_spi_probe
1
2
3
4
5
6
7
8
9
10
11 #include <linux/module.h>
12 #include <linux/regmap.h>
13 #include <linux/spi/spi.h>
14 #include <sound/soc.h>
15
16 #include "tlv320aic23.h"
17
18 static int aic23_spi_probe(struct spi_device *spi)
19 {
20 int ret;
21 struct regmap *regmap;
22
23 dev_dbg(&spi->dev, "probing tlv320aic23 spi device\n");
24
25 spi->mode = SPI_MODE_0;
26 ret = spi_setup(spi);
27 if (ret < 0)
28 return ret;
29
30 regmap = devm_regmap_init_spi(spi, &tlv320aic23_regmap);
31 return tlv320aic23_probe(&spi->dev, regmap);
32 }
33
34 static struct spi_driver aic23_spi = {
35 .driver = {
36 .name = "tlv320aic23",
37 },
38 .probe = aic23_spi_probe,
39 };
40
41 module_spi_driver(aic23_spi);
42
43 MODULE_DESCRIPTION("ASoC TLV320AIC23 codec driver SPI");
44 MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>");
45 MODULE_LICENSE("GPL");