Skip to contentSkip to conversation

ASoC: tlv320aic23: add support for SPI control mode

PATCH Superseded Max Filippov 3 participants 6 messages Mar 6, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: tlv320aic23: add support for SPI control mode

tlv320aic23 chip control interface may work in either I2C or SPI mode depending on the MODE pin state. Functionality and register layout are independent of the control mode.

Provide i2c and spi driver entry points when CONFIG_I2C and CONFIG_SPI_MASTER are enabled respectively.

---
 sound/soc/codecs/Kconfig       |  2 +-
 sound/soc/codecs/tlv320aic23.c | 58 +++++++++++++++++++++++++++++++++++++++---
 2 files changed, 56 insertions(+), 4 deletions(-)
sound/soc/codecs/Kconfig +1 -1
index 983d087a..6d82de5 100644
@@ -71,7 +71,7 @@ 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 if SND_SOC_I2C_AND_SPI
 	select SND_SOC_TLV320AIC26 if SPI_MASTER
 	select SND_SOC_TLV320AIC32X4 if I2C
 	select SND_SOC_TLV320AIC3X if I2C
sound/soc/codecs/tlv320aic23.c +55 -3

85 lines not on this page · raw message

Signature · 1 line
1.8.1.4
maintainer
#1 lore raw

sound/soc/codecs/Kconfig config SND_SOC_ALL_CODECS · line 74

Quoted 2 lines · Max Filippov
sound/soc/codecs/Kconfig +1 -1
-	select SND_SOC_TLV320AIC23 if I2C
+	select SND_SOC_TLV320AIC23 if SND_SOC_I2C_AND_SPI

We're moving towards having drivers have separate bus drivers rather than in one file - take a look at how drivers like ad193x handle this.

#2 lore raw

Hi Mark,

Quoted 7 lines · Mark Brown

sound/soc/codecs/Kconfig config SND_SOC_ALL_CODECS · line 74

Quoted 2 lines · Max Filippov
sound/soc/codecs/Kconfig +1 -1
-     select SND_SOC_TLV320AIC23 if I2C
+     select SND_SOC_TLV320AIC23 if SND_SOC_I2C_AND_SPI

We're moving towards having drivers have separate bus drivers rather than in one file - take a look at how drivers like ad193x handle this.

Thanks for the pointer, but... ad193x has spi and i2c in single source in both linus and alsa-kernel trees. Confused.

Signature · 2 lines
Thanks.
-- Max
#3 lore raw
Quoted 5 lines · Max Filippov

Hi Mark,

Quoted 2 lines · Mark Brown

On Thu, Mar 06, 2014 at 11:44:22AM +0400, Max Filippov wrote:

Quoted 9 lines
Quoted 5 lines

sound/soc/codecs/Kconfig config SND_SOC_ALL_CODECS · line 74

Quoted 2 lines
sound/soc/codecs/Kconfig +1 -1
-     select SND_SOC_TLV320AIC23 if I2C
+     select SND_SOC_TLV320AIC23 if SND_SOC_I2C_AND_SPI

We're moving towards having drivers have separate bus drivers rather than in one file - take a look at how drivers like ad193x handle this.

Thanks for the pointer, but... ad193x has spi and i2c in single source in both linus and alsa-kernel trees. Confused.

It's in the ASoC tree: http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/sound/soc/codecs/?h=for-next&id=6c3d713e6d32706999689e379a9098afb4cd8a2c

#4 lore raw
Quoted 16 lines · Lars-Peter Clausen
Quoted 15 lines · Max Filippov

Hi Mark,

Quoted 9 lines · Mark Brown

sound/soc/codecs/Kconfig config SND_SOC_ALL_CODECS · line 74

Quoted 2 lines · Max Filippov
sound/soc/codecs/Kconfig +1 -1
-     select SND_SOC_TLV320AIC23 if I2C
+     select SND_SOC_TLV320AIC23 if SND_SOC_I2C_AND_SPI

We're moving towards having drivers have separate bus drivers rather than in one file - take a look at how drivers like ad193x handle this.

Quoted 6 lines
Quoted 3 lines

Thanks for the pointer, but... ad193x has spi and i2c in single source in both linus and alsa-kernel trees. Confused.

It's in the ASoC tree:
http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/sound/soc/codecs/?h=for-next&id=6c3d713e6d32706999689e379a9098afb4cd8a2c

Thank you Lars-Peter. I'll do the same split for aic23.

Signature · 2 lines
Thanks.
-- Max
maintainer
#5 lore raw
Quoted 6 lines · Max Filippov
Quoted 2 lines · Lars-Peter Clausen

It's in the ASoC tree:
http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/sound/soc/codecs/?h=for-next&id=6c3d713e6d32706999689e379a9098afb4cd8a2c

Thank you Lars-Peter. I'll do the same split for aic23.

In general when submitting code you should be looking at the latest development code, MAINTAINERS will have a pointer or most of the time linux-next is a good approximation.