Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3024156ybp; Sun, 6 Oct 2019 03:07:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwo0b+3dcgJBzjdRFQ1wNaa7pBCucAZFSaauecNB/gkaB6feJqSnxiOLm66IIpL8lHjNETS X-Received: by 2002:a50:d6db:: with SMTP id l27mr24207151edj.164.1570356457955; Sun, 06 Oct 2019 03:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570356457; cv=none; d=google.com; s=arc-20160816; b=RTqaR15Kyrlv1AWKEEhQP6sPePIiGUconPZaCzl6oVcYmZx5zL9cmLDeo42KZVjhHS ETrNZ+32k9amUl2dGxQoDgm+vFGfU4wUWxltfNTzDd8TdoblUiMx500hB6/ZIBU0Gh2t ywuyQB36Ncam9Y1JcxcyMBVle5NV6j23kGDoxdL9ivop+eO4rQZz/WYLqpeo9M+0S0Cj 0HcPsFoa3XYp/qvdkr5Mybzfw9UuxoSKvBqI9T4x/ju6vAZca/cdIBJc318T7251cCa5 fbJV0NyAQpfiNr+NPRlcgj5XP3LKDScMxYQuGv6QFrvp1N5xuwUvqnDn/KIqN+UyxaRl l3Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=TWMgbvCdcbiLj6UQqv7Qz5XKE7/8Cvpf41K3BgUx1eQ=; b=M3n4O2IoOtwjXQNBBRDDLmpmt+uFKKbv9IrhxqSyJ8PnFU+jCE0e13jnmw5msUEj+G GBwRMTc9HZ8ZB+RJPGD4kVShar9RVyVNTG+zL1c7gR7Yb7KrLJ4aml9137+lwwQbcbWb dGzgYY8+GzT2Teh/I3aTj4aaFIXZEgGWsUgBN6IFQCkwCDTek9uqTScfpbRuo21CLEme LKqX6GJA2oo5TnRiDxuCxos+6dEm/djm6DYpUeWgxKu+CXf5f3+gkS/vmtVoFTnTjWdf WAesm60LiMcAjuLSargTIgRfB+7BFTqbUWIdcy6eVC+/Cices6GMo5m92B3fG4XHOOcZ jZcg== 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 ox13si5469455ejb.0.2019.10.06.03.07.14; Sun, 06 Oct 2019 03:07:37 -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 S1726357AbfJFKGf (ORCPT + 99 others); Sun, 6 Oct 2019 06:06:35 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51348 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726261AbfJFKGf (ORCPT ); Sun, 6 Oct 2019 06:06:35 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3BE62B1B645913D1E252; Sun, 6 Oct 2019 18:06:33 +0800 (CST) Received: from [127.0.0.1] (10.133.213.239) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Sun, 6 Oct 2019 18:06:29 +0800 Subject: Re: [alsa-devel] [PATCH -next] ASoc: tas2770: Fix build error without GPIOLIB To: Ladislav Michl References: <20191006072241.56808-1-yuehaibing@huawei.com> <20191006095720.GA13261@lenoch> CC: , , , , , , , , , , , , , , , , From: Yuehaibing Message-ID: <4f5b8272-c299-ecc2-83f2-e7cdc534f061@huawei.com> Date: Sun, 6 Oct 2019 18:06:27 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20191006095720.GA13261@lenoch> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> 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. 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 > > . >