ASoC: cs4349: Add support for Cirrus Logic CS4349 breaks on multiple arch
Subsystems (3)
Hi Tim,
This commit:
e40da86a37f64c73b810bc7a63d77c44dc61accb is the first bad commit commit e40da86a37f64c73b810bc7a63d77c44dc61accb
Author: Tim Howe <[email protected]> Date: Thu Jul 16 14:51:40 2015 -0500
ASoC: cs4349: Add support for Cirrus Logic CS4349
is showing up in linux-next build failures for mips, parisc and s390.
sound/soc/codecs/cs4349.c:300:2: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration] sound/soc/codecs/cs4349.c:301:12: error: 'GPIOD_OUT_LOW' undeclared (first use in this function) sound/soc/codecs/cs4349.c:306:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
Here are a few examples:
http://kisskb.ellerman.id.au/kisskb/buildresult/12465322/
http://kisskb.ellerman.id.au/kisskb/buildresult/12465445/
http://kisskb.ellerman.id.au/kisskb/buildresult/12465246/
I'm guessing it needs some tighter Kconfig dependencies to block it from being selected on arch that don't have/enable gpio stuff.
Paul.
Hi Paul,
Quoted 23 lines · Paul Gortmaker
Hi Tim,
This commit:
e40da86a37f64c73b810bc7a63d77c44dc61accbis the first bad commit commite40da86a37f64c73b810bc7a63d77c44dc61accbAuthor: Tim Howe <[email protected]> Date: Thu Jul 16 14:51:40 2015 -0500ASoC: cs4349: Add support for Cirrus Logic CS4349
Signed-off-by Tim Howe <[email protected]>Signed-off-by Mark Brown <[email protected]>is showing up in linux-next build failures for mips, parisc and s390.
sound/soc/codecs/cs4349.c:300:2: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]sound/soc/codecs/cs4349.c:301:12: error: 'GPIOD_OUT_LOW' undeclared (first use in this function)sound/soc/codecs/cs4349.c:306:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
Quoted 8 lines
Here are a few examples:
http://kisskb.ellerman.id.au/kisskb/buildresult/12465322/
http://kisskb.ellerman.id.au/kisskb/buildresult/12465445/
http://kisskb.ellerman.id.au/kisskb/buildresult/12465246/I'm guessing it needs some tighter
Kconfigdependencies to block it from being selected on arch that don't have/enable gpio stuff.
Would this fix the problem?
+++ b/sound/soc/codecs/Kconfig
@@ -53,7 +53,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_CS4271_I2C if I2C select SND_SOC_CS4271_SPI if SPI_MASTER select SND_SOC_CS42XX8_I2C if I2C
- select SND_SOC_CS4349 if I2C
+ select SND_SOC_CS4349 if I2C && GPIOLIB
select SND_SOC_CX20442 if TTY
select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI select SND_SOC_DA7213 if I2C
Review config SND_SOC_ALL_CODECS · line 59
Quoted 12 lines · Fabio Estevam
Would this fix the problem?
+++ b/sound/soc/codecs/Kconfig
(quoted diff) +1
-1@@ -53,7 +53,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_CS4271_I2C if I2C select SND_SOC_CS4271_SPI if SPI_MASTER select SND_SOC_CS42XX8_I2C if I2C - select SND_SOC_CS4349 if I2C + select SND_SOC_CS4349 if I2C && GPIOLIB select SND_SOC_CX20442 if TTY select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI select SND_SOC_DA7213 if I2C
Or this one:
sound/soc/codecs/Kconfig +2 -2
@@ -53,7 +53,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_CS4271_I2C if I2C select SND_SOC_CS4271_SPI if SPI_MASTER select SND_SOC_CS42XX8_I2C if I2C - select SND_SOC_CS4349 if I2C + select SND_SOC_CS4349 if I2C && GPIOLIB select SND_SOC_CX20442 if TTY select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI select SND_SOC_DA7213 if I2C
@@ -410,7 +410,7 @@ config SND_SOC_CS42XX8_I2C # Cirrus Logic CS4349 HiFi DAC config SND_SOC_CS4349 tristate "Cirrus Logic CS4349 CODEC" - depends on I2C + depends on I2C && GPIOLIB config SND_SOC_CX20442 tristate
Mark Brown
maintainersound/soc/codecs/Kconfig config SND_SOC_ALL_CODECS · line 56
Quoted 2 lines · Fabio Estevam
sound/soc/codecs/Kconfig +1
-1- select SND_SOC_CS4349 if I2C + select SND_SOC_CS4349 if I2C && GPIOLIB
We don't need Kconfig, we need to include the relevant header for the stubs - gpiolib is like regulator and should stub itself out. akpm has a fix in his tree but he hasn't sent it as a patch so I need to go fish it out of the notification e-mail which will probably happen on Monday or something.
Though quite why an arch would have I2C and not GPIOs...