From patchwork Tue Mar 10 16:35:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11429885 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76F25138D for ; Tue, 10 Mar 2020 16:37:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0CB5121D56 for ; Tue, 10 Mar 2020 16:37:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="fsG5vHGs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CB5121D56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 47819167A; Tue, 10 Mar 2020 17:37:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 47819167A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1583858268; bh=vdnO1mD5uP9Ut6DxkvLV2R/8hUHrcWzbroHl7Qu4ua4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fsG5vHGsqCmkhEqJYieQrPqXUxATui1MP5ioOiWUwNlnpRWium8SW3to2lufyZOfU 7G7qAKll4gtkdxYSdRl0srgX8iSamvQ/+cqY5UfwzZHlAAFWf6LIV9QjHf2m+oCJXM 1fcF6/y95n4EEr0MgojFJiEDRNFua5TtW9HR0T/Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 69643F80268; Tue, 10 Mar 2020 17:35:26 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id AA4DBF8028C; Tue, 10 Mar 2020 17:35:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A2E79F800BC for ; Tue, 10 Mar 2020 17:35:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A2E79F800BC X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 09:35:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,537,1574150400"; d="scan'208";a="388985481" Received: from djdickof-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.252.192.103]) by orsmga004.jf.intel.com with ESMTP; 10 Mar 2020 09:35:12 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 1/3] ASoC: rt5682: fix unmet dependencies Date: Tue, 10 Mar 2020 11:35:07 -0500 Message-Id: <20200310163509.14466-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200310163509.14466-1-pierre-louis.bossart@linux.intel.com> References: <20200310163509.14466-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Oder Chiou , broonie@kernel.org, Pierre-Louis Bossart , kbuild test robot 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" The rt5682 code can be used in I2C or SoundWire mode. When I2C is not selected, we have the following issue: WARNING: unmet direct dependencies detected for SND_SOC_RT5682 Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && I2C [=n] Selected by [m]: - SND_SOC_RT5682_SDW [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && SOUNDWIRE [=m] Fix by adding SOUNDWIRE as a dependency. Reported-by: kbuild test robot Fixes: 03f6fc6de9192f ('ASoC: rt5682: Add the soundwire support') Cc: Oder Chiou Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 6aee70ed43df..78be69e9b618 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -1135,7 +1135,7 @@ config SND_SOC_RT5677_SPI config SND_SOC_RT5682 tristate - depends on I2C + depends on I2C || SOUNDWIRE config SND_SOC_RT5682_SDW tristate "Realtek RT5682 Codec - SDW" From patchwork Tue Mar 10 16:35:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11429883 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 031C8139A for ; Tue, 10 Mar 2020 16:37:06 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8D82721D56 for ; Tue, 10 Mar 2020 16:37:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="k1At1VEs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D82721D56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 EFAE51663; Tue, 10 Mar 2020 17:36:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EFAE51663 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1583858224; bh=RKU8+9V/KTVjpvGlIZIV7Wtd/ZjtivY3U13wwNDktHQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=k1At1VEsaty2A1mPN5nA3vM1qIE8vt3HbE85oF3i0/1JSUsWKIT7+fiFVTCYINK0B KVU64yAdl4XSPUpMAMjFv+Z14bHdVFuZj5VW4qnllXGbuFW3Bf/il3W6R+WDrhk8xD 5bA0DQCn1myin/fqvA+mCIof1uUfZATOXUdx2dUQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6FE22F80260; Tue, 10 Mar 2020 17:35:23 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B1AE8F80246; Tue, 10 Mar 2020 17:35:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3CBEBF80217 for ; Tue, 10 Mar 2020 17:35:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3CBEBF80217 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 09:35:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,537,1574150400"; d="scan'208";a="388985487" Received: from djdickof-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.252.192.103]) by orsmga004.jf.intel.com with ESMTP; 10 Mar 2020 09:35:13 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 2/3] ASoC: rt5682: fix compilation issues without I2C Date: Tue, 10 Mar 2020 11:35:08 -0500 Message-Id: <20200310163509.14466-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200310163509.14466-1-pierre-louis.bossart@linux.intel.com> References: <20200310163509.14466-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Oder Chiou , broonie@kernel.org, Pierre-Louis Bossart , kbuild test robot 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" Exclude all I2C-related code from compilation to avoid compilation errors and defined but not used warnings. sound/soc/codecs/rt5682.c:3688:26: warning: 'rt5682_i2c_driver' defined but not used [-Wunused-variable] static struct i2c_driver rt5682_i2c_driver = { ^~~~~~~~~~~~~~~~~ Reported-by: kbuild test robot Fixes: 03f6fc6de9192f ('ASoC: rt5682: Add the soundwire support') Cc: Oder Chiou Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5682.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index e1df2d076533..8828ed5db58d 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -33,6 +33,7 @@ #include "rt5682.h" #include "rt5682-sdw.h" +#if IS_ENABLED(CONFIG_I2C) static const char *rt5682_supply_names[RT5682_NUM_SUPPLIES] = { "AVDD", "MICVDD", @@ -47,6 +48,7 @@ static const struct rt5682_platform_data i2s_default_platform_data = { .dai_clk_names[RT5682_DAI_WCLK_IDX] = "rt5682-dai-wclk", .dai_clk_names[RT5682_DAI_BCLK_IDX] = "rt5682-dai-bclk", }; +#endif static const struct reg_sequence patch_list[] = { {RT5682_HP_IMP_SENS_CTRL_19, 0x1000}, @@ -974,6 +976,7 @@ static int rt5682_headset_detect(struct snd_soc_component *component, return rt5682->jack_type; } +#if IS_ENABLED(CONFIG_I2C) static irqreturn_t rt5682_irq(int irq, void *data) { struct rt5682_priv *rt5682 = data; @@ -1002,6 +1005,7 @@ static void rt5682_jd_check_handler(struct work_struct *work) schedule_delayed_work(&rt5682->jd_check_work, 500); } } +#endif static int rt5682_set_jack_detect(struct snd_soc_component *component, struct snd_soc_jack *hs_jack, void *data) @@ -3214,6 +3218,7 @@ static const struct regmap_config rt5682_regmap = { .use_single_write = true, }; +#if IS_ENABLED(CONFIG_I2C) static const struct i2c_device_id rt5682_i2c_id[] = { {"rt5682", 0}, {} @@ -3244,6 +3249,7 @@ static int rt5682_parse_dt(struct rt5682_priv *rt5682, struct device *dev) return 0; } +#endif static void rt5682_calibrate(struct rt5682_priv *rt5682) { @@ -3510,6 +3516,7 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) EXPORT_SYMBOL_GPL(rt5682_io_init); #endif +#if IS_ENABLED(CONFIG_I2C) static int rt5682_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -3668,6 +3675,7 @@ static void rt5682_i2c_shutdown(struct i2c_client *client) rt5682_reset(rt5682); } +#endif #ifdef CONFIG_OF static const struct of_device_id rt5682_of_match[] = { @@ -3685,6 +3693,7 @@ static const struct acpi_device_id rt5682_acpi_match[] = { MODULE_DEVICE_TABLE(acpi, rt5682_acpi_match); #endif +#if IS_ENABLED(CONFIG_I2C) static struct i2c_driver rt5682_i2c_driver = { .driver = { .name = "rt5682", @@ -3696,6 +3705,7 @@ static struct i2c_driver rt5682_i2c_driver = { .id_table = rt5682_i2c_id, }; module_i2c_driver(rt5682_i2c_driver); +#endif MODULE_DESCRIPTION("ASoC RT5682 driver"); MODULE_AUTHOR("Bard Liao "); From patchwork Tue Mar 10 16:35:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11429889 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F3384138D for ; Tue, 10 Mar 2020 16:38:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7E43E21D56 for ; Tue, 10 Mar 2020 16:38:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="kXjPIuCh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E43E21D56 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 CFD201662; Tue, 10 Mar 2020 17:37:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CFD201662 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1583858303; bh=jfiwWO8cE6YFj4r/UOjdudca4wOIxuuFKrvLd8Uonq4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kXjPIuChi5cvsXNazDWjql9vbZP2gl+izL1e/p5nt0iZCy/I0yPARf6Mjo4oWjpF0 8I/laJTgIvc/S9ptko/dMGkrAnIsFP8vGrZnivVXPFlp7H8xEEvKdyAxf3TwUtcAew U1y1UzuLxvrSqfc2vcYPbgeA+TKCfDHm4N4igBNk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 63F59F8028E; Tue, 10 Mar 2020 17:35:27 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 228E0F8028B; Tue, 10 Mar 2020 17:35:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A6AA8F8020C for ; Tue, 10 Mar 2020 17:35:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A6AA8F8020C X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 09:35:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,537,1574150400"; d="scan'208";a="388985491" Received: from djdickof-mobl.amr.corp.intel.com (HELO pbossart-mobl3.amr.corp.intel.com) ([10.252.192.103]) by orsmga004.jf.intel.com with ESMTP; 10 Mar 2020 09:35:14 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 3/3] ASoC: rt5682-sdw: fix 'defined but not used' pm functions Date: Tue, 10 Mar 2020 11:35:09 -0500 Message-Id: <20200310163509.14466-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200310163509.14466-1-pierre-louis.bossart@linux.intel.com> References: <20200310163509.14466-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, Oder Chiou , broonie@kernel.org, Pierre-Louis Bossart , kbuild test robot 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" Gcc reports the following warnings: sound/soc/codecs/rt5682-sdw.c:286:12: warning: 'rt5682_dev_resume' defined but not used [-Wunused-function] static int rt5682_dev_resume(struct device *dev) ^~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5682-sdw.c:273:12: warning: 'rt5682_dev_suspend' defined but not used [-Wunused-function] static int rt5682_dev_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~ Fix by adding maybe_unused as done for other SoundWire codecs Reported-by: kbuild test robot Fixes: 03f6fc6de9192f ('ASoC: rt5682: Add the soundwire support') Cc: Oder Chiou Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt5682-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c index fc31d04b5203..e456bdd15207 100644 --- a/sound/soc/codecs/rt5682-sdw.c +++ b/sound/soc/codecs/rt5682-sdw.c @@ -270,7 +270,7 @@ static const struct sdw_device_id rt5682_id[] = { }; MODULE_DEVICE_TABLE(sdw, rt5682_id); -static int rt5682_dev_suspend(struct device *dev) +static int __maybe_unused rt5682_dev_suspend(struct device *dev) { struct rt5682_priv *rt5682 = dev_get_drvdata(dev); @@ -283,7 +283,7 @@ static int rt5682_dev_suspend(struct device *dev) return 0; } -static int rt5682_dev_resume(struct device *dev) +static int __maybe_unused rt5682_dev_resume(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct rt5682_priv *rt5682 = dev_get_drvdata(dev);