All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 0/2] ASoC: codecs: Fix build error
@ 2022-05-11  1:23 ` Hui Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-11  1:23 UTC (permalink / raw)
  To: lgirdwood
  Cc: broonie, perex, tiwai, ryan.lee.analog, ricardw, steve,
	alsa-devel, linux-kernel, tanghui20

Fix two build error, as follows:

tanghui (2):
  ASoC: max98396: Fix build error for implicit function declaration
  ASoC: tlv320adc3xxx: Fix build error for implicit function declaration

 sound/soc/codecs/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH -next 0/2] ASoC: codecs: Fix build error
@ 2022-05-11  1:23 ` Hui Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-11  1:23 UTC (permalink / raw)
  To: lgirdwood
  Cc: alsa-devel, steve, tanghui20, linux-kernel, tiwai, ricardw,
	broonie, ryan.lee.analog

Fix two build error, as follows:

tanghui (2):
  ASoC: max98396: Fix build error for implicit function declaration
  ASoC: tlv320adc3xxx: Fix build error for implicit function declaration

 sound/soc/codecs/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration
  2022-05-11  1:23 ` Hui Tang
@ 2022-05-11  1:23   ` Hui Tang
  -1 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-11  1:23 UTC (permalink / raw)
  To: lgirdwood
  Cc: broonie, perex, tiwai, ryan.lee.analog, ricardw, steve,
	alsa-devel, linux-kernel, tanghui20

sound/soc/codecs/max98396.c: In function ‘max98396_i2c_probe’:
sound/soc/codecs/max98396.c:1555:25: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_regulator_get_optional’? [-Werror=implicit-function-declaration]
  max98396->reset_gpio = devm_gpiod_get_optional(&i2c->dev,
                         ^~~~~~~~~~~~~~~~~~~~~~~
                         devm_regulator_get_optional
sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
              "reset", GPIOD_OUT_HIGH);
                       ^~~~~~~~~~~~~~
                       GPIOF_INIT_HIGH
sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
   gpiod_set_value_cansleep(max98396->reset_gpio, 0);
   ^~~~~~~~~~~~~~~~~~~~~~~~
   gpio_set_value_cansleep
cc1: all warnings being treated as errors

Add depend on GPIOLIB for 'config SND_SOC_MAX98396'

Fixes: b58581136770 ("ASoC: max98396: add amplifier driver")
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
 sound/soc/codecs/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index b106e5517090..71a7afedd0aa 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1051,6 +1051,7 @@ config SND_SOC_MAX98390
 config SND_SOC_MAX98396
 	tristate "Analog Devices MAX98396 Speaker Amplifier"
 	depends on I2C
+	depends on GPIOLIB
 	help
 	  Enable support for Analog Devices MAX98396 audio
 	  amplifier. The device provides a PCM interface for
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration
@ 2022-05-11  1:23   ` Hui Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-11  1:23 UTC (permalink / raw)
  To: lgirdwood
  Cc: alsa-devel, steve, tanghui20, linux-kernel, tiwai, ricardw,
	broonie, ryan.lee.analog

sound/soc/codecs/max98396.c: In function ‘max98396_i2c_probe’:
sound/soc/codecs/max98396.c:1555:25: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_regulator_get_optional’? [-Werror=implicit-function-declaration]
  max98396->reset_gpio = devm_gpiod_get_optional(&i2c->dev,
                         ^~~~~~~~~~~~~~~~~~~~~~~
                         devm_regulator_get_optional
sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
              "reset", GPIOD_OUT_HIGH);
                       ^~~~~~~~~~~~~~
                       GPIOF_INIT_HIGH
sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
   gpiod_set_value_cansleep(max98396->reset_gpio, 0);
   ^~~~~~~~~~~~~~~~~~~~~~~~
   gpio_set_value_cansleep
cc1: all warnings being treated as errors

Add depend on GPIOLIB for 'config SND_SOC_MAX98396'

Fixes: b58581136770 ("ASoC: max98396: add amplifier driver")
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
 sound/soc/codecs/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index b106e5517090..71a7afedd0aa 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1051,6 +1051,7 @@ config SND_SOC_MAX98390
 config SND_SOC_MAX98396
 	tristate "Analog Devices MAX98396 Speaker Amplifier"
 	depends on I2C
+	depends on GPIOLIB
 	help
 	  Enable support for Analog Devices MAX98396 audio
 	  amplifier. The device provides a PCM interface for
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 2/2] ASoC: tlv320adc3xxx: Fix build error for implicit function declaration
  2022-05-11  1:23 ` Hui Tang
@ 2022-05-11  1:23   ` Hui Tang
  -1 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-11  1:23 UTC (permalink / raw)
  To: lgirdwood
  Cc: broonie, perex, tiwai, ryan.lee.analog, ricardw, steve,
	alsa-devel, linux-kernel, tanghui20

sound/soc/codecs/tlv320adc3xxx.c: In function ‘adc3xxx_i2c_probe’:
sound/soc/codecs/tlv320adc3xxx.c:1359:21: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’? [-Werror=implicit-function-declaration]
  adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                     ^~~~~~~~~~~~~~
                     devm_gpio_free
  CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgt215.o
  LD [M]  sound/soc/codecs/snd-soc-ak4671.o
  LD [M]  sound/soc/codecs/snd-soc-arizona.o
  LD [M]  sound/soc/codecs/snd-soc-cros-ec-codec.o
  LD [M]  sound/soc/codecs/snd-soc-ak4641.o
  LD [M]  sound/soc/codecs/snd-soc-alc5632.o
sound/soc/codecs/tlv320adc3xxx.c:1359:50: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
  adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                                                  ^~~~~~~~~~~~~
                                                  GPIOF_INIT_LOW
sound/soc/codecs/tlv320adc3xxx.c:1359:50: note: each undeclared identifier is reported only once for each function it appears in
  LD [M]  sound/soc/codecs/snd-soc-cs35l32.o
sound/soc/codecs/tlv320adc3xxx.c:1408:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
  gpiod_set_value_cansleep(adc3xxx->rst_pin, 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~
  gpio_set_value_cansleep
  LD [M]  sound/soc/codecs/snd-soc-cs35l41-lib.o
  LD [M]  sound/soc/codecs/snd-soc-cs35l36.o
  LD [M]  sound/soc/codecs/snd-soc-cs35l34.o
  LD [M]  sound/soc/codecs/snd-soc-cs35l41.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp89.o
cc1: all warnings being treated as errors

Add depend on GPIOLIB for 'config SND_SOC_TLV320ADC3XXX'

Fixes: e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver")
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
 sound/soc/codecs/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 71a7afedd0aa..920486e01afb 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1583,6 +1583,7 @@ config SND_SOC_TFA989X
 config SND_SOC_TLV320ADC3XXX
 	tristate "Texas Instruments TLV320ADC3001/3101 audio ADC"
 	depends on I2C
+	depends on GPIOLIB
 	help
 	 Enable support for Texas Instruments TLV320ADC3001 and TLV320ADC3101
 	 ADCs.
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH -next 2/2] ASoC: tlv320adc3xxx: Fix build error for implicit function declaration
@ 2022-05-11  1:23   ` Hui Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-11  1:23 UTC (permalink / raw)
  To: lgirdwood
  Cc: alsa-devel, steve, tanghui20, linux-kernel, tiwai, ricardw,
	broonie, ryan.lee.analog

sound/soc/codecs/tlv320adc3xxx.c: In function ‘adc3xxx_i2c_probe’:
sound/soc/codecs/tlv320adc3xxx.c:1359:21: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’? [-Werror=implicit-function-declaration]
  adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                     ^~~~~~~~~~~~~~
                     devm_gpio_free
  CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgt215.o
  LD [M]  sound/soc/codecs/snd-soc-ak4671.o
  LD [M]  sound/soc/codecs/snd-soc-arizona.o
  LD [M]  sound/soc/codecs/snd-soc-cros-ec-codec.o
  LD [M]  sound/soc/codecs/snd-soc-ak4641.o
  LD [M]  sound/soc/codecs/snd-soc-alc5632.o
sound/soc/codecs/tlv320adc3xxx.c:1359:50: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
  adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                                                  ^~~~~~~~~~~~~
                                                  GPIOF_INIT_LOW
sound/soc/codecs/tlv320adc3xxx.c:1359:50: note: each undeclared identifier is reported only once for each function it appears in
  LD [M]  sound/soc/codecs/snd-soc-cs35l32.o
sound/soc/codecs/tlv320adc3xxx.c:1408:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
  gpiod_set_value_cansleep(adc3xxx->rst_pin, 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~
  gpio_set_value_cansleep
  LD [M]  sound/soc/codecs/snd-soc-cs35l41-lib.o
  LD [M]  sound/soc/codecs/snd-soc-cs35l36.o
  LD [M]  sound/soc/codecs/snd-soc-cs35l34.o
  LD [M]  sound/soc/codecs/snd-soc-cs35l41.o
  CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/sormcp89.o
cc1: all warnings being treated as errors

Add depend on GPIOLIB for 'config SND_SOC_TLV320ADC3XXX'

Fixes: e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver")
Signed-off-by: Hui Tang <tanghui20@huawei.com>
---
 sound/soc/codecs/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 71a7afedd0aa..920486e01afb 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1583,6 +1583,7 @@ config SND_SOC_TFA989X
 config SND_SOC_TLV320ADC3XXX
 	tristate "Texas Instruments TLV320ADC3001/3101 audio ADC"
 	depends on I2C
+	depends on GPIOLIB
 	help
 	 Enable support for Texas Instruments TLV320ADC3001 and TLV320ADC3101
 	 ADCs.
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration
  2022-05-11  1:23   ` Hui Tang
@ 2022-05-11 12:06     ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2022-05-11 12:06 UTC (permalink / raw)
  To: Hui Tang
  Cc: lgirdwood, perex, tiwai, ryan.lee.analog, ricardw, steve,
	alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

On Wed, May 11, 2022 at 09:23:47AM +0800, Hui Tang wrote:

>                          devm_regulator_get_optional
> sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
>               "reset", GPIOD_OUT_HIGH);
>                        ^~~~~~~~~~~~~~
>                        GPIOF_INIT_HIGH
> sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
> sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
>    gpiod_set_value_cansleep(max98396->reset_gpio, 0);
>    ^~~~~~~~~~~~~~~~~~~~~~~~
>    gpio_set_value_cansleep
> cc1: all warnings being treated as errors
> 
> Add depend on GPIOLIB for 'config SND_SOC_MAX98396'

No, these issues are missing headers not dependencies.  In general
gpiolib stubs out so drivers can optionally use GPIO functionality.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration
@ 2022-05-11 12:06     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2022-05-11 12:06 UTC (permalink / raw)
  To: Hui Tang
  Cc: alsa-devel, steve, linux-kernel, tiwai, lgirdwood, ricardw,
	ryan.lee.analog

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

On Wed, May 11, 2022 at 09:23:47AM +0800, Hui Tang wrote:

>                          devm_regulator_get_optional
> sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
>               "reset", GPIOD_OUT_HIGH);
>                        ^~~~~~~~~~~~~~
>                        GPIOF_INIT_HIGH
> sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
> sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
>    gpiod_set_value_cansleep(max98396->reset_gpio, 0);
>    ^~~~~~~~~~~~~~~~~~~~~~~~
>    gpio_set_value_cansleep
> cc1: all warnings being treated as errors
> 
> Add depend on GPIOLIB for 'config SND_SOC_MAX98396'

No, these issues are missing headers not dependencies.  In general
gpiolib stubs out so drivers can optionally use GPIO functionality.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration
  2022-05-11 12:06     ` Mark Brown
@ 2022-05-12  4:46       ` Hui Tang
  -1 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-12  4:46 UTC (permalink / raw)
  To: Mark Brown
  Cc: lgirdwood, perex, tiwai, ryan.lee.analog, ricardw, steve,
	alsa-devel, linux-kernel



On 2022/5/11 20:06, Mark Brown wrote:
> On Wed, May 11, 2022 at 09:23:47AM +0800, Hui Tang wrote:
>
>>                          devm_regulator_get_optional
>> sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
>>               "reset", GPIOD_OUT_HIGH);
>>                        ^~~~~~~~~~~~~~
>>                        GPIOF_INIT_HIGH
>> sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
>> sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
>>    gpiod_set_value_cansleep(max98396->reset_gpio, 0);
>>    ^~~~~~~~~~~~~~~~~~~~~~~~
>>    gpio_set_value_cansleep
>> cc1: all warnings being treated as errors
>>
>> Add depend on GPIOLIB for 'config SND_SOC_MAX98396'
>
> No, these issues are missing headers not dependencies.  In general
> gpiolib stubs out so drivers can optionally use GPIO functionality.
>

Ok, I will do that

thank you

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration
@ 2022-05-12  4:46       ` Hui Tang
  0 siblings, 0 replies; 10+ messages in thread
From: Hui Tang @ 2022-05-12  4:46 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, steve, linux-kernel, tiwai, lgirdwood, ricardw,
	ryan.lee.analog



On 2022/5/11 20:06, Mark Brown wrote:
> On Wed, May 11, 2022 at 09:23:47AM +0800, Hui Tang wrote:
>
>>                          devm_regulator_get_optional
>> sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
>>               "reset", GPIOD_OUT_HIGH);
>>                        ^~~~~~~~~~~~~~
>>                        GPIOF_INIT_HIGH
>> sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
>> sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
>>    gpiod_set_value_cansleep(max98396->reset_gpio, 0);
>>    ^~~~~~~~~~~~~~~~~~~~~~~~
>>    gpio_set_value_cansleep
>> cc1: all warnings being treated as errors
>>
>> Add depend on GPIOLIB for 'config SND_SOC_MAX98396'
>
> No, these issues are missing headers not dependencies.  In general
> gpiolib stubs out so drivers can optionally use GPIO functionality.
>

Ok, I will do that

thank you

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-05-12  4:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11  1:23 [PATCH -next 0/2] ASoC: codecs: Fix build error Hui Tang
2022-05-11  1:23 ` Hui Tang
2022-05-11  1:23 ` [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration Hui Tang
2022-05-11  1:23   ` Hui Tang
2022-05-11 12:06   ` Mark Brown
2022-05-11 12:06     ` Mark Brown
2022-05-12  4:46     ` Hui Tang
2022-05-12  4:46       ` Hui Tang
2022-05-11  1:23 ` [PATCH -next 2/2] ASoC: tlv320adc3xxx: " Hui Tang
2022-05-11  1:23   ` Hui Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.