Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Yuehaibing <yuehaibing@huawei.com>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: m.felsch@pengutronix.de, andradanciu1997@gmail.com,
	ckeepax@opensource.cirrus.com, kuninori.morimoto.gx@renesas.com,
	linux-kernel@vger.kernel.org, mirq-linux@rere.qmqm.pl,
	piotrs@opensource.cirrus.com, tiwai@suse.com,
	lgirdwood@gmail.com, paul@crapouillou.net,
	alsa-devel@alsa-project.org, broonie@kernel.org,
	srinivas.kandagatla@linaro.org, enric.balletbo@collabora.com,
	shifu0704@thundersoft.com, rf@opensource.wolfsonmicro.com
Subject: Re: [alsa-devel] [PATCH -next] ASoc: tas2770: Fix build error without GPIOLIB
Date: Sun, 6 Oct 2019 18:06:27 +0800
Message-ID: <4f5b8272-c299-ecc2-83f2-e7cdc534f061@huawei.com> (raw)
In-Reply-To: <20191006095720.GA13261@lenoch>

On 2019/10/6 17:57, Ladislav Michl wrote:
> Dear YueHaibing,
> 
> On Sun, Oct 06, 2019 at 03:22:41PM +0800, YueHaibing wrote:
>> If GPIOLIB is not set, building fails:
>>
>> sound/soc/codecs/tas2770.c: In function tas2770_reset:
>> sound/soc/codecs/tas2770.c:38: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(tas2770->reset_gpio, 0);
>>    ^~~~~~~~~~~~~~~~~~~~~~~~
>>    gpio_set_value_cansleep
>> sound/soc/codecs/tas2770.c: In function tas2770_i2c_probe:
>> sound/soc/codecs/tas2770.c:749:24: error: implicit declaration of function devm_gpiod_get_optional; did you mean devm_regulator_get_optional? [-Werror=implicit-function-declaration]
>>   tas2770->reset_gpio = devm_gpiod_get_optional(tas2770->dev,
>>                         ^~~~~~~~~~~~~~~~~~~~~~~
>>                         devm_regulator_get_optional
>> sound/soc/codecs/tas2770.c:751:13: error: GPIOD_OUT_HIGH undeclared (first use in this function); did you mean GPIOF_INIT_HIGH?
>>              GPIOD_OUT_HIGH);
>>              ^~~~~~~~~~~~~~
>>              GPIOF_INIT_HIGH
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver")
>> Signed-off-by: YueHaibing <yuehaibing@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 bcac957..d639f17 100644
>> --- a/sound/soc/codecs/Kconfig
>> +++ b/sound/soc/codecs/Kconfig
>> @@ -1108,6 +1108,7 @@ config SND_SOC_TAS2552
>>  config SND_SOC_TAS2770
>>  	tristate "Texas Instruments TAS2770 speaker amplifier"
>>  	depends on I2C
>> +	select GPIOLIB
> 
> GPIOLIB API is working perfectly fine even if GPIOLIB is not selected
> and gpiod_* functions will merely return -ENOSYS in this case.
> Please see <linux/gpio/consumer.h> and fix your patch accordingly.


Thanks, will send v2 as your suggestion.

> 
>>  config SND_SOC_TAS5086
>>  	tristate "Texas Instruments TAS5086 speaker amplifier"
>> -- 
>> 2.7.4
>>
>>
>> _______________________________________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 
> .
> 

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06  7:22 YueHaibing
2019-10-06  9:57 ` Ladislav Michl
2019-10-06 10:06   ` Yuehaibing [this message]
2019-10-06 10:46 ` [alsa-devel] [PATCH v2 " YueHaibing
2019-10-06 15:31   ` mirq-linux
2019-10-06 19:12     ` Ladislav Michl
2019-10-07 13:03   ` [alsa-devel] Applied "ASoc: tas2770: Fix build error without GPIOLIB" to the asoc tree Mark Brown
2019-10-08 16:35     ` Ladislav Michl
2019-10-08 16:52       ` Mark Brown

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f5b8272-c299-ecc2-83f2-e7cdc534f061@huawei.com \
    --to=yuehaibing@huawei.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andradanciu1997@gmail.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=enric.balletbo@collabora.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=ladis@linux-mips.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=paul@crapouillou.net \
    --cc=piotrs@opensource.cirrus.com \
    --cc=rf@opensource.wolfsonmicro.com \
    --cc=shifu0704@thundersoft.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org
	public-inbox-index alsa-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git