Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b621d0f authored by Mark Brown's avatar Mark Brown
Browse files

Merge branch 'topic/tlv320aic23' of...

Merge branch 'topic/tlv320aic23' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-samsung
parents 4f07c9cc cc1bc54a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,6 +58,6 @@ config SND_AT91_SOC_AFEB9260
	depends on ARCH_AT91 && ATMEL_SSC && ARCH_AT91 && MACH_AFEB9260 && SND_ATMEL_SOC
	select SND_ATMEL_SOC_PDC
	select SND_ATMEL_SOC_SSC
	select SND_SOC_TLV320AIC23
	select SND_SOC_TLV320AIC23_I2C
	help
	  Say Y here to support sound on AFEB9260 board.
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ config SND_EP93XX_SOC_SNAPPERCL15
        tristate "SoC Audio support for Bluewater Systems Snapper CL15 module"
        depends on SND_EP93XX_SOC && MACH_SNAPPER_CL15
        select SND_EP93XX_SOC_I2S
        select SND_SOC_TLV320AIC23
        select SND_SOC_TLV320AIC23_I2C
        help
          Say Y or M here if you want to add support for I2S audio on the
          Bluewater Systems Snapper CL15 module.
+10 −1
Original line number Diff line number Diff line
@@ -71,7 +71,8 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_STA529 if I2C
	select SND_SOC_STAC9766 if SND_SOC_AC97_BUS
	select SND_SOC_TAS5086 if I2C
	select SND_SOC_TLV320AIC23 if I2C
	select SND_SOC_TLV320AIC23_I2C if I2C
	select SND_SOC_TLV320AIC23_SPI if SPI_MASTER
	select SND_SOC_TLV320AIC26 if SPI_MASTER
	select SND_SOC_TLV320AIC32X4 if I2C
	select SND_SOC_TLV320AIC3X if I2C
@@ -357,6 +358,14 @@ config SND_SOC_TAS5086
config SND_SOC_TLV320AIC23
	tristate

config SND_SOC_TLV320AIC23_I2C
	tristate
	select SND_SOC_TLV320AIC23

config SND_SOC_TLV320AIC23_SPI
	tristate
	select SND_SOC_TLV320AIC23

config SND_SOC_TLV320AIC26
	tristate
	depends on SPI
+4 −0
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ snd-soc-sta529-objs := sta529.o
snd-soc-stac9766-objs := stac9766.o
snd-soc-tas5086-objs := tas5086.o
snd-soc-tlv320aic23-objs := tlv320aic23.o
snd-soc-tlv320aic23-i2c-objs := tlv320aic23-i2c.o
snd-soc-tlv320aic23-spi-objs := tlv320aic23-spi.o
snd-soc-tlv320aic26-objs := tlv320aic26.o
snd-soc-tlv320aic3x-objs := tlv320aic3x.o
snd-soc-tlv320aic32x4-objs := tlv320aic32x4.o
@@ -193,6 +195,8 @@ obj-$(CONFIG_SND_SOC_STA529) += snd-soc-sta529.o
obj-$(CONFIG_SND_SOC_STAC9766)	+= snd-soc-stac9766.o
obj-$(CONFIG_SND_SOC_TAS5086)	+= snd-soc-tas5086.o
obj-$(CONFIG_SND_SOC_TLV320AIC23)	+= snd-soc-tlv320aic23.o
obj-$(CONFIG_SND_SOC_TLV320AIC23_I2C)	+= snd-soc-tlv320aic23-i2c.o
obj-$(CONFIG_SND_SOC_TLV320AIC23_SPI)	+= snd-soc-tlv320aic23-spi.o
obj-$(CONFIG_SND_SOC_TLV320AIC26)	+= snd-soc-tlv320aic26.o
obj-$(CONFIG_SND_SOC_TLV320AIC3X)	+= snd-soc-tlv320aic3x.o
obj-$(CONFIG_SND_SOC_TLV320AIC32X4)     += snd-soc-tlv320aic32x4.o
+59 −0
Original line number Diff line number Diff line
/*
 * ALSA SoC TLV320AIC23 codec driver I2C interface
 *
 * Author:      Arun KS, <arunks@mistralsolutions.com>
 * Copyright:   (C) 2008 Mistral Solutions Pvt Ltd.,
 *
 * Based on sound/soc/codecs/wm8731.c by Richard Purdie
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <sound/soc.h>

#include "tlv320aic23.h"

static int tlv320aic23_i2c_probe(struct i2c_client *i2c,
				 const struct i2c_device_id *i2c_id)
{
	struct regmap *regmap;

	if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
		return -EINVAL;

	regmap = devm_regmap_init_i2c(i2c, &tlv320aic23_regmap);
	return tlv320aic23_probe(&i2c->dev, regmap);
}

static int __exit tlv320aic23_i2c_remove(struct i2c_client *i2c)
{
	snd_soc_unregister_codec(&i2c->dev);
	return 0;
}

static const struct i2c_device_id tlv320aic23_id[] = {
	{"tlv320aic23", 0},
	{}
};

MODULE_DEVICE_TABLE(i2c, tlv320aic23_id);

static struct i2c_driver tlv320aic23_i2c_driver = {
	.driver = {
		   .name = "tlv320aic23-codec",
		   },
	.probe = tlv320aic23_i2c_probe,
	.remove = __exit_p(tlv320aic23_i2c_remove),
	.id_table = tlv320aic23_id,
};

module_i2c_driver(tlv320aic23_i2c_driver);

MODULE_DESCRIPTION("ASoC TLV320AIC23 codec driver I2C");
MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>");
MODULE_LICENSE("GPL");
Loading