From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3575C433EF for ; Wed, 11 May 2022 01:25:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240334AbiEKBZa (ORCPT ); Tue, 10 May 2022 21:25:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240272AbiEKBZV (ORCPT ); Tue, 10 May 2022 21:25:21 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 277FCE15FC for ; Tue, 10 May 2022 18:25:19 -0700 (PDT) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Kycds2qvHzbmKr; Wed, 11 May 2022 09:24:49 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 11 May 2022 09:25:17 +0800 Received: from ubuntu1804.huawei.com (10.67.175.30) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 11 May 2022 09:25:16 +0800 From: Hui Tang To: CC: , , , , , , , , Subject: [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration Date: Wed, 11 May 2022 09:23:47 +0800 Message-ID: <20220511012348.94288-2-tanghui20@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220511012348.94288-1-tanghui20@huawei.com> References: <20220511012348.94288-1-tanghui20@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.175.30] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD1BCC433F5 for ; Wed, 11 May 2022 12:17:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id ECDDB1A5F; Wed, 11 May 2022 14:16:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ECDDB1A5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652271427; bh=iT44Df24W99f679m5H2TkILSfKdzabCWh2C/JrxB51o=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TulQy8pZMJavJ9rffQuwQc8igvj/idpwFUAf2+5Gwpba1UX5iLxhoblo1WtxF08Dp dw9snGt5/ueGzRWl0VjbbiohTYL8jdh3u113YO5mlHFT0dcnKPG0omV6rwVpHybZ5V TEeo4Q7qAwccV7BvR2KrFEJqFOHF8qu5RFrVh21A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9FF00F80516; Wed, 11 May 2022 14:15:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24270F80212; Wed, 11 May 2022 03:25:30 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 143F8F80116 for ; Wed, 11 May 2022 03:25:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 143F8F80116 Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Kycds2qvHzbmKr; Wed, 11 May 2022 09:24:49 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 11 May 2022 09:25:17 +0800 Received: from ubuntu1804.huawei.com (10.67.175.30) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 11 May 2022 09:25:16 +0800 From: Hui Tang To: Subject: [PATCH -next 1/2] ASoC: max98396: Fix build error for implicit function declaration Date: Wed, 11 May 2022 09:23:47 +0800 Message-ID: <20220511012348.94288-2-tanghui20@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220511012348.94288-1-tanghui20@huawei.com> References: <20220511012348.94288-1-tanghui20@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.175.30] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-Mailman-Approved-At: Wed, 11 May 2022 14:14:58 +0200 Cc: alsa-devel@alsa-project.org, steve@sk2.org, tanghui20@huawei.com, linux-kernel@vger.kernel.org, tiwai@suse.com, ricardw@axis.com, broonie@kernel.org, ryan.lee.analog@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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 --- 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