media: v4l: rcar_fdp1: Change platform dependency to ARCH_RENESAS
[linux/fpc-iii.git] / sound / soc / codecs / tlv320aic23-spi.c
blobd8c9ec1e92014991b1ea7194acb5c4ac9310da8d
1 /*
2 * ALSA SoC TLV320AIC23 codec driver SPI interface
4 * Author: Arun KS, <arunks@mistralsolutions.com>
5 * Copyright: (C) 2008 Mistral Solutions Pvt Ltd.,
7 * Based on sound/soc/codecs/wm8731.c by Richard Purdie
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/module.h>
15 #include <linux/regmap.h>
16 #include <linux/spi/spi.h>
17 #include <sound/soc.h>
19 #include "tlv320aic23.h"
21 static int aic23_spi_probe(struct spi_device *spi)
23 int ret;
24 struct regmap *regmap;
26 dev_dbg(&spi->dev, "probing tlv320aic23 spi device\n");
28 spi->mode = SPI_MODE_0;
29 ret = spi_setup(spi);
30 if (ret < 0)
31 return ret;
33 regmap = devm_regmap_init_spi(spi, &tlv320aic23_regmap);
34 return tlv320aic23_probe(&spi->dev, regmap);
37 static struct spi_driver aic23_spi = {
38 .driver = {
39 .name = "tlv320aic23",
41 .probe = aic23_spi_probe,
44 module_spi_driver(aic23_spi);
46 MODULE_DESCRIPTION("ASoC TLV320AIC23 codec driver SPI");
47 MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>");
48 MODULE_LICENSE("GPL");