Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3016896ybp; Sun, 6 Oct 2019 02:59:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfvf4B17CgkmqmfGgngfjNDyWhTt12puccraWhDoIfWVee6WLNlJjShk7WFzBdYkcxBLTH X-Received: by 2002:a17:906:7499:: with SMTP id e25mr11456394ejl.326.1570355958777; Sun, 06 Oct 2019 02:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570355958; cv=none; d=google.com; s=arc-20160816; b=FIQBICix1k4RDmpf/UsnrWb+Pb4OBkpDVIK9AmFTMV822pU2wmcfo/HPtXqY6+Ty1M Lly4WkOWNy8Amu3TqHghCrhAlYGZhGl+oP3fuPV+bV26EPQGcazRNPtbQuc3ecsCse+q pQEoUts/j+hW8xFAfAxq0WcjkId9cRTkPyPJQDim5VBgHmlQNDhGElD2Z8R3QlRy08b8 cWIJ8+hvonL5aJhTxd91FNwvKhcXD0eVpmyRlzQk5yACuUGNyCM9hmoeXaRcDe/u7e1D 4sPHF67wYH4TriAwG12i6cfoM+qRYk12gqULzUsqtrnBfM521JGkfaNjwSXjEFdG58J9 5v0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ngimGGqdpox29B+qzAvpzQGIB4kafyfSFzj3F8mjUME=; b=Q0avYqo0buwSiov07MHJhgqFGdvoI+WjcbRbgoeegfGJQy/5ETssWksgj2Pw3Sa9Jm jIaM4hwa6wWNcOnPSq0YidgwDVoncPoFBT2vmnnfaE3ySVBVwZ+TKwHWcndQddglQIl1 Pm6087Kynz7KjqDfd7FOXOauyVkhJB/qIz0Eb6LY2GVWF/RRDRptqOJZTb1rMBB2USkA Zm3K5tlaOCxCP+qaSPupW2BzqnPjRHysoWIxXMJoGBfux8SupQ7PCxFKwPWCSxJlKAVM omPNvAyLBL4b3nv9Oi04MxuDgXQst+6aqNGID8chbkT/tQhuyq7Uu5022DQKdRC7XttQ P/uA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si5433506ejj.327.2019.10.06.02.58.55; Sun, 06 Oct 2019 02:59:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726450AbfJFJ5a (ORCPT + 99 others); Sun, 6 Oct 2019 05:57:30 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:42912 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfJFJ5a (ORCPT ); Sun, 6 Oct 2019 05:57:30 -0400 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990413AbfJFJ51AhgUS (ORCPT ); Sun, 6 Oct 2019 11:57:27 +0200 Date: Sun, 6 Oct 2019 11:57:20 +0200 From: Ladislav Michl To: YueHaibing Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, ckeepax@opensource.cirrus.com, rf@opensource.wolfsonmicro.com, piotrs@opensource.cirrus.com, enric.balletbo@collabora.com, paul@crapouillou.net, srinivas.kandagatla@linaro.org, andradanciu1997@gmail.com, mirq-linux@rere.qmqm.pl, kuninori.morimoto.gx@renesas.com, m.felsch@pengutronix.de, shifu0704@thundersoft.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [PATCH -next] ASoc: tas2770: Fix build error without GPIOLIB Message-ID: <20191006095720.GA13261@lenoch> References: <20191006072241.56808-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191006072241.56808-1-yuehaibing@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Fixes: 1a476abc723e ("tas2770: add tas2770 smart PA kernel driver") > Signed-off-by: YueHaibing > --- > 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 and fix your patch accordingly. > 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