From patchwork Thu Apr 30 08:22:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11519433 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 1E4AC14DD for ; Thu, 30 Apr 2020 08:25:11 +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 A996D20838 for ; Thu, 30 Apr 2020 08:25:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Ess2FjHo"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="YKkY+vnr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A996D20838 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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 017C81680; Thu, 30 Apr 2020 10:24:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 017C81680 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235109; bh=Qhgi/O2t7nXOvs/vJBWw84dWIwgdVMXWLzFLsb3k2xI=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ess2FjHolbYQXVsGg5g7xx0e6SKkXggSwbWnMlzlcJUhNbrjcKT5YV6Kc0LjLDEPa 5t5Gfg6u25gD6O39Q0XYpIo2pc2yRlu6im/fc1MAUqwbfZ+CqmyHaoZHxXzGix8UGq IFhGgKN96Tg1VYwnEpPGW5wY/de5/B6/KJd3Q+Cc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B6177F80271; Thu, 30 Apr 2020 10:22:50 +0200 (CEST) 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 C81E1F8028C; Thu, 30 Apr 2020 10:22:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75108F80266 for ; Thu, 30 Apr 2020 10:22:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75108F80266 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="YKkY+vnr" Received: by mail-yb1-xb49.google.com with SMTP id g17so6900246ybk.4 for ; Thu, 30 Apr 2020 01:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=+QbyXCMWScEYIowgLIK0JS5woGAQrFK1EDiEHL1sfVo=; b=YKkY+vnrVL9zifogmdXZsTvj2bpRTN8p5ZwHlErBPit7rjaJM9RL9rrt5c8Uv2W5RZ nJsGPZDCuBy+6t9Vn8dXrzBP6re6oXEBD4aG84v768xtJrO5xaBKtipWCO0xKdhHgwJM 5R2luF5LBu5ilU6eJg/fKay+z9WU4uDkvivHhM5eCxgdYVSbGaa4lrrKQs4OcXn9AQxR WJisMFp4tErDjrXP2qyH4weY90G9NazBtoiVGrjpSbmFs4OXYlvW+B12GJGB21+r5VOw siwp0qNtws194KUcHnLFTgXONa4Y1+8SIT8a0JedKrG7CArolgmmVxNq0Q0dIAl2GuYF S98g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=+QbyXCMWScEYIowgLIK0JS5woGAQrFK1EDiEHL1sfVo=; b=Zwrg4VNlpZZA1aXElDCSQ5RFAahYvz8aZjf5VJtvF6j9uBpmYjaqZ1oqVW/iiph1ol Ry//Jl5j4vsBgTpOTH8r7b4VjosjdLyQeE3xzKPGPAT6HP6Hd0GP+398Cx5rrsXcBSs1 acPUntKDARV29D+hVyXGVij53Gz6sPKpelV4nNjAZ84bRMjgkVD1RJF8ilkGw8C48U0K qIgfDrhV80ekOgwqecdV6+Ea+Wit7lsb7faxWxoJlOB6EcL1hoFXLqt26p27jwQo0bt3 WBUe1/rFTOpGCTLSeT5xWqPyEEZ/TzGMFKFlkDfXOsVgJEaGz0e2Ejes7+bAAdz+yG3O z3tg== X-Gm-Message-State: AGi0PuYHi+DkRJ6qYHdue6yXLyc5UcMUDibjgrt5Fz/1xbx6MVIAr80x 0ZpOb/CQ08Lfe9hdTNgF5ky/FS3lJRPl X-Google-Smtp-Source: APiQypKkhnbTgkEYC+UYLolSafCNnS1VpVTxc5dEYk4OdTqs2mOC42YyORcQ7Y1wxXX/3szlPxHYQe5u6MaW X-Received: by 2002:a25:6404:: with SMTP id y4mr4039202ybb.374.1588234963414; Thu, 30 Apr 2020 01:22:43 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:26 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-2-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 1/6] ASoC: rt5682: simplify assertions From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org 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" Simplifies assertions for errors. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index d36f560ad7a8..e542aab46619 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -3462,7 +3462,7 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) ret = regmap_multi_reg_write(rt5682->regmap, patch_list, ARRAY_SIZE(patch_list)); - if (ret != 0) + if (ret) dev_warn(dev, "Failed to apply regmap patch: %d\n", ret); regmap_write(rt5682->regmap, RT5682_DEPOP_1, 0x0000); @@ -3536,8 +3536,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, rt5682 = devm_kzalloc(&i2c->dev, sizeof(struct rt5682_priv), GFP_KERNEL); - - if (rt5682 == NULL) + if (!rt5682) return -ENOMEM; i2c_set_clientdata(i2c, rt5682); @@ -3562,14 +3561,14 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(rt5682->supplies), rt5682->supplies); - if (ret != 0) { + if (ret) { dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret); return ret; } ret = regulator_bulk_enable(ARRAY_SIZE(rt5682->supplies), rt5682->supplies); - if (ret != 0) { + if (ret) { dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret); return ret; } @@ -3599,7 +3598,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, ret = regmap_multi_reg_write(rt5682->regmap, patch_list, ARRAY_SIZE(patch_list)); - if (ret != 0) + if (ret) dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); regmap_write(rt5682->regmap, RT5682_DEPOP_1, 0x0000); From patchwork Thu Apr 30 08:22:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11519435 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 8CB0A14B4 for ; Thu, 30 Apr 2020 08:25:47 +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 22FC92073E for ; Thu, 30 Apr 2020 08:25:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="URDRKEu6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="iTeeh83c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 22FC92073E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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 754601688; Thu, 30 Apr 2020 10:24:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 754601688 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235145; bh=b8ntDEEDKg0/rchaKVayUctEWczBysCFIXz+kuwo7/0=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=URDRKEu6SI2/Afnd4NT+MxFvmF4uBxBlC0bwqm4HbZj+fr/UMZbPW1//SrR9S4vie IYPC5MkE2FskLm6dP4er1mjKJaLQq4cP649XSomSSkEpoK/8aHtC0uJRsZ9zvDj9HN ah5tXhh7jB/F3E3Nn6l+Z2kh+J97GVOLwYmtg/ag= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C553BF80290; Thu, 30 Apr 2020 10:22:54 +0200 (CEST) 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 1D8E2F80291; Thu, 30 Apr 2020 10:22:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 74BA1F8028F for ; Thu, 30 Apr 2020 10:22:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 74BA1F8028F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="iTeeh83c" Received: by mail-qk1-x74a.google.com with SMTP id x5so5686716qkn.20 for ; Thu, 30 Apr 2020 01:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=cZF6Zh5TCKLM+tuvvR7Rv+aGHRb5P7H7sI7vNd4sUdI=; b=iTeeh83c+HGfhvMfYmSA2oPO6pA3+/jFgSgpuFP9+lByjgOOQZIROa0YSxhlK7WusB m/qXD9Z44gipdFvXffR4HHItnXYsKOoimNVu4dnXyY7Pepb04v6jOSVSz06KRwPCgugy 8PqtexVRL+ZfQcvpl57i723c9TnQl3pRtCrhNKs925hwDJ0wPwdYT0t0e31blmzEgD3j LiMwKG3HCj9qTJitqNysRg41+af7hKsTcZGx6fJdjvZ4RcHHi6Mq19XGGokLwjf8XRlH /+GFL/Dmwt0eYBCpT8rRCkdLqJjRqiGJ9tT377jqpsMH7VDgGEznBvyNg3zNE7WV5zwa YTBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=cZF6Zh5TCKLM+tuvvR7Rv+aGHRb5P7H7sI7vNd4sUdI=; b=OLN/IMvVjaXz5WNLz+Z6WrWNUxc5hb5v1AemlUuDuQbQVETBaMf0XzTrv+2ySHYIzd 9uV8iDkmYqhS4lF9PY0Es6vUF58GUFZhBA3QZ+4lcVykgeLkVty7GM3gj2lyycZzi2/g eeI81QyziSGWtArUdBwIGo640f18R4XKZyspNSD2Z1dArX/klFeZEiqLRzEU6r3N/aGJ 9Ht2AudL3dbC7KXLmHHdb5DBfNQwLV4/qjNKs1CUqe+la3dbAzrDqJVhpTbH8P89RnI7 8QI4J7xcAVNTbl31rv/R4LK0q83MAHp7DZrMEx1H/F2R30tAZ/ZUy57PSf3qFbctnL82 XDoA== X-Gm-Message-State: AGi0PubDNg7J4rrsBB0QeKRRVj2JEWUAVXhnbX2P4Pbwwi8JDiE+aILS 222zD3DuS0Y2XLvB6mFU2CBcBSrAjsz/ X-Google-Smtp-Source: APiQypKT08S1XqZLNauwyALmhIvKx0js6lsMcF/R/ZAhTTPTNGvrZVAe6i1Ejdqok7MhHLQsN70XWnpvNwpn X-Received: by 2002:ad4:4105:: with SMTP id i5mr1805662qvp.205.1588234967260; Thu, 30 Apr 2020 01:22:47 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:27 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-3-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 2/6] ASoC: rt5682: fix space issues From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org 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" Fixes blank lines and indent issues. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 152 ++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 82 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index e542aab46619..7a38028f5e10 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -806,6 +806,7 @@ static void rt5682_reset(struct rt5682_priv *rt5682) if (!rt5682->is_sdw) regmap_write(rt5682->regmap, RT5682_I2C_MODE, 1); } + /** * rt5682_sel_asrc_clk_src - select ASRC clock source for a set of filters * @component: SoC audio component device. @@ -823,7 +824,6 @@ static void rt5682_reset(struct rt5682_priv *rt5682) int rt5682_sel_asrc_clk_src(struct snd_soc_component *component, unsigned int filter_mask, unsigned int clk_src) { - switch (clk_src) { case RT5682_CLK_SEL_SYS: case RT5682_CLK_SEL_I2S1_ASRC: @@ -918,7 +918,6 @@ static int rt5682_headset_detect(struct snd_soc_component *component, unsigned int val, count; if (jack_insert) { - snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1, RT5682_PWR_VREF2 | RT5682_PWR_MB, RT5682_PWR_VREF2 | RT5682_PWR_MB); @@ -952,7 +951,6 @@ static int rt5682_headset_detect(struct snd_soc_component *component, default: rt5682->jack_type = SND_JACK_HEADPHONE; } - } else { rt5682_enable_push_button_irq(component, false); snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_1, @@ -979,7 +977,7 @@ static irqreturn_t rt5682_irq(int irq, void *data) struct rt5682_priv *rt5682 = data; mod_delayed_work(system_power_efficient_wq, - &rt5682->jack_detect_work, msecs_to_jiffies(250)); + &rt5682->jack_detect_work, msecs_to_jiffies(250)); return IRQ_HANDLED; } @@ -995,16 +993,16 @@ static void rt5682_jd_check_handler(struct work_struct *work) rt5682->jack_type = rt5682_headset_detect(rt5682->component, 0); snd_soc_jack_report(rt5682->hs_jack, rt5682->jack_type, - SND_JACK_HEADSET | - SND_JACK_BTN_0 | SND_JACK_BTN_1 | - SND_JACK_BTN_2 | SND_JACK_BTN_3); + SND_JACK_HEADSET | + SND_JACK_BTN_0 | SND_JACK_BTN_1 | + SND_JACK_BTN_2 | SND_JACK_BTN_3); } else { schedule_delayed_work(&rt5682->jd_check_work, 500); } } static int rt5682_set_jack_detect(struct snd_soc_component *component, - struct snd_soc_jack *hs_jack, void *data) + struct snd_soc_jack *hs_jack, void *data) { struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); @@ -1013,9 +1011,9 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component, if (!rt5682->is_sdw) { if (!hs_jack) { regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2, - RT5682_JD1_EN_MASK, RT5682_JD1_DIS); + RT5682_JD1_EN_MASK, RT5682_JD1_DIS); regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL, - RT5682_POW_JDH | RT5682_POW_JDL, 0); + RT5682_POW_JDH | RT5682_POW_JDL, 0); cancel_delayed_work_sync(&rt5682->jack_detect_work); return 0; } @@ -1058,15 +1056,15 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component, 0x7f7f, (rt5682->pdata.btndet_delay << 8 | rt5682->pdata.btndet_delay)); mod_delayed_work(system_power_efficient_wq, - &rt5682->jack_detect_work, - msecs_to_jiffies(250)); + &rt5682->jack_detect_work, + msecs_to_jiffies(250)); break; case RT5682_JD_NULL: regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2, RT5682_JD1_EN_MASK, RT5682_JD1_DIS); regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL, - RT5682_POW_JDH | RT5682_POW_JDL, 0); + RT5682_POW_JDH | RT5682_POW_JDL, 0); break; default: @@ -1148,9 +1146,9 @@ static void rt5682_jack_detect_handler(struct work_struct *work) } snd_soc_jack_report(rt5682->hs_jack, rt5682->jack_type, - SND_JACK_HEADSET | - SND_JACK_BTN_0 | SND_JACK_BTN_1 | - SND_JACK_BTN_2 | SND_JACK_BTN_3); + SND_JACK_HEADSET | + SND_JACK_BTN_0 | SND_JACK_BTN_1 | + SND_JACK_BTN_2 | SND_JACK_BTN_3); if (!rt5682->is_sdw) { if (rt5682->jack_type & (SND_JACK_BTN_0 | SND_JACK_BTN_1 | @@ -1184,15 +1182,13 @@ static const struct snd_kcontrol_new rt5682_snd_controls[] = { 3, 0, adc_bst_tlv), }; - static int rt5682_div_sel(struct rt5682_priv *rt5682, - int target, const int div[], int size) + int target, const int div[], int size) { int i; if (rt5682->sysclk < target) { - pr_err("sysclk rate %d is too low\n", - rt5682->sysclk); + pr_err("sysclk rate %d is too low\n", rt5682->sysclk); return 0; } @@ -1201,18 +1197,17 @@ static int rt5682_div_sel(struct rt5682_priv *rt5682, if (target * div[i] == rt5682->sysclk) return i; if (target * div[i + 1] > rt5682->sysclk) { - dev_dbg(rt5682->component->dev, "can't find div for sysclk %d\n", + dev_dbg(rt5682->component->dev, + "can't find div for sysclk %d\n", rt5682->sysclk); return i; } } if (target * div[i] < rt5682->sysclk) - pr_err("sysclk rate %d is too high\n", - rt5682->sysclk); + pr_err("sysclk rate %d is too high\n", rt5682->sysclk); return size - 1; - } /** @@ -1226,7 +1221,7 @@ static int rt5682_div_sel(struct rt5682_priv *rt5682, * It is better for clock to approximate 3MHz. */ static int set_dmic_clk(struct snd_soc_dapm_widget *w, - struct snd_kcontrol *kcontrol, int event) + struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); @@ -1246,7 +1241,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, } static int set_filter_clk(struct snd_soc_dapm_widget *w, - struct snd_kcontrol *kcontrol, int event) + struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); @@ -1290,7 +1285,7 @@ static int set_filter_clk(struct snd_soc_dapm_widget *w, } static int is_sys_clk_from_pll1(struct snd_soc_dapm_widget *w, - struct snd_soc_dapm_widget *sink) + struct snd_soc_dapm_widget *sink) { unsigned int val; struct snd_soc_component *component = @@ -1305,7 +1300,7 @@ static int is_sys_clk_from_pll1(struct snd_soc_dapm_widget *w, } static int is_sys_clk_from_pll2(struct snd_soc_dapm_widget *w, - struct snd_soc_dapm_widget *sink) + struct snd_soc_dapm_widget *sink) { unsigned int val; struct snd_soc_component *component = @@ -1320,7 +1315,7 @@ static int is_sys_clk_from_pll2(struct snd_soc_dapm_widget *w, } static int is_using_asrc(struct snd_soc_dapm_widget *w, - struct snd_soc_dapm_widget *sink) + struct snd_soc_dapm_widget *sink) { unsigned int reg, shift, val; struct snd_soc_component *component = @@ -1347,7 +1342,6 @@ static int is_using_asrc(struct snd_soc_dapm_widget *w, default: return 0; } - } /* Digital Mixer */ @@ -1501,13 +1495,13 @@ static const struct snd_kcontrol_new rt5682_alg_dac_r1_mux = /* Out Switch */ static const struct snd_kcontrol_new hpol_switch = SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT5682_HP_CTRL_1, - RT5682_L_MUTE_SFT, 1, 1); + RT5682_L_MUTE_SFT, 1, 1); static const struct snd_kcontrol_new hpor_switch = SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT5682_HP_CTRL_1, - RT5682_R_MUTE_SFT, 1, 1); + RT5682_R_MUTE_SFT, 1, 1); static int rt5682_hp_event(struct snd_soc_dapm_widget *w, - struct snd_kcontrol *kcontrol, int event) + struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); @@ -1538,11 +1532,10 @@ static int rt5682_hp_event(struct snd_soc_dapm_widget *w, } return 0; - } static int set_dmic_power(struct snd_soc_dapm_widget *w, - struct snd_kcontrol *kcontrol, int event) + struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); @@ -1566,7 +1559,7 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w, } static int rt5682_set_verf(struct snd_soc_dapm_widget *w, - struct snd_kcontrol *kcontrol, int event) + struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); @@ -1743,23 +1736,23 @@ static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = { /* Digital Interface Select */ SND_SOC_DAPM_MUX("IF1 01 ADC Swap Mux", SND_SOC_NOPM, 0, 0, - &rt5682_if1_01_adc_swap_mux), + &rt5682_if1_01_adc_swap_mux), SND_SOC_DAPM_MUX("IF1 23 ADC Swap Mux", SND_SOC_NOPM, 0, 0, - &rt5682_if1_23_adc_swap_mux), + &rt5682_if1_23_adc_swap_mux), SND_SOC_DAPM_MUX("IF1 45 ADC Swap Mux", SND_SOC_NOPM, 0, 0, - &rt5682_if1_45_adc_swap_mux), + &rt5682_if1_45_adc_swap_mux), SND_SOC_DAPM_MUX("IF1 67 ADC Swap Mux", SND_SOC_NOPM, 0, 0, - &rt5682_if1_67_adc_swap_mux), + &rt5682_if1_67_adc_swap_mux), SND_SOC_DAPM_MUX("IF2 ADC Swap Mux", SND_SOC_NOPM, 0, 0, - &rt5682_if2_adc_swap_mux), + &rt5682_if2_adc_swap_mux), SND_SOC_DAPM_MUX("ADCDAT Mux", SND_SOC_NOPM, 0, 0, - &rt5682_adcdat_pin_ctrl), + &rt5682_adcdat_pin_ctrl), SND_SOC_DAPM_MUX("DAC L Mux", SND_SOC_NOPM, 0, 0, - &rt5682_dac_l_mux), + &rt5682_dac_l_mux), SND_SOC_DAPM_MUX("DAC R Mux", SND_SOC_NOPM, 0, 0, - &rt5682_dac_r_mux), + &rt5682_dac_r_mux), /* Audio Interface */ SND_SOC_DAPM_AIF_OUT("AIF1TX", "AIF1 Capture", 0, @@ -1831,7 +1824,6 @@ static const struct snd_soc_dapm_widget rt5682_dapm_widgets[] = { /* Output Lines */ SND_SOC_DAPM_OUTPUT("HPOL"), SND_SOC_DAPM_OUTPUT("HPOR"), - }; static const struct snd_soc_dapm_route rt5682_dapm_routes[] = { @@ -1997,7 +1989,7 @@ static const struct snd_soc_dapm_route rt5682_dapm_routes[] = { }; static int rt5682_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, - unsigned int rx_mask, int slots, int slot_width) + unsigned int rx_mask, int slots, int slot_width) { struct snd_soc_component *component = dai->component; unsigned int cl, val = 0; @@ -2065,9 +2057,8 @@ static int rt5682_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, return 0; } - static int rt5682_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) + struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); @@ -2085,7 +2076,7 @@ static int rt5682_hw_params(struct snd_pcm_substream *substream, } dev_dbg(dai->dev, "lrck is %dHz and pre_div is %d for iis %d\n", - rt5682->lrck[dai->id], pre_div, dai->id); + rt5682->lrck[dai->id], pre_div, dai->id); switch (params_width(params)) { case 16: @@ -2469,7 +2460,7 @@ static int rt5682_set_bclk2_ratio(struct snd_soc_dai *dai, unsigned int ratio) } static int rt5682_set_bias_level(struct snd_soc_component *component, - enum snd_soc_bias_level level) + enum snd_soc_bias_level level) { struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); @@ -2667,7 +2658,7 @@ static unsigned long rt5682_bclk_recalc_rate(struct clk_hw *hw, unsigned int bclks_per_wclk; snd_soc_component_read(component, RT5682_TDM_TCON_CTRL, - &bclks_per_wclk); + &bclks_per_wclk); switch (bclks_per_wclk & RT5682_TDM_BCLK_MS1_MASK) { case RT5682_TDM_BCLK_MS1_256: @@ -2954,7 +2945,7 @@ struct sdw_stream_data { }; static int rt5682_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream, - int direction) + int direction) { struct sdw_stream_data *stream; @@ -2997,8 +2988,8 @@ static int rt5682_sdw_hw_params(struct snd_pcm_substream *substream, unsigned int val_p = 0, val_c = 0, osr_p = 0, osr_c = 0; dev_dbg(dai->dev, "%s %s", __func__, dai->name); - stream = snd_soc_dai_get_dma_data(dai, substream); + stream = snd_soc_dai_get_dma_data(dai, substream); if (!stream) return -ENOMEM; @@ -3114,7 +3105,7 @@ static int rt5682_sdw_hw_params(struct snd_pcm_substream *substream, } static int rt5682_sdw_hw_free(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) + struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); @@ -3308,7 +3299,6 @@ static void rt5682_calibrate(struct rt5682_priv *rt5682) regmap_write(rt5682->regmap, RT5682_STO1_ADC_MIXER, 0xc0c4); mutex_unlock(&rt5682->calibrate_mutex); - } #if IS_ENABLED(CONFIG_SND_SOC_RT5682_SDW) @@ -3363,7 +3353,7 @@ static const struct regmap_config rt5682_sdw_regmap = { }; int rt5682_sdw_init(struct device *dev, struct regmap *regmap, - struct sdw_slave *slave) + struct sdw_slave *slave) { struct rt5682_priv *rt5682; int ret; @@ -3461,23 +3451,23 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) } ret = regmap_multi_reg_write(rt5682->regmap, patch_list, - ARRAY_SIZE(patch_list)); + ARRAY_SIZE(patch_list)); if (ret) dev_warn(dev, "Failed to apply regmap patch: %d\n", ret); regmap_write(rt5682->regmap, RT5682_DEPOP_1, 0x0000); regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_1, - RT5682_LDO1_DVO_MASK | RT5682_HP_DRIVER_MASK, - RT5682_LDO1_DVO_12 | RT5682_HP_DRIVER_5X); + RT5682_LDO1_DVO_MASK | RT5682_HP_DRIVER_MASK, + RT5682_LDO1_DVO_12 | RT5682_HP_DRIVER_5X); regmap_write(rt5682->regmap, RT5682_MICBIAS_2, 0x0380); regmap_write(rt5682->regmap, RT5682_TEST_MODE_CTRL_1, 0x0000); regmap_update_bits(rt5682->regmap, RT5682_BIAS_CUR_CTRL_8, - RT5682_HPA_CP_BIAS_CTRL_MASK, RT5682_HPA_CP_BIAS_3UA); + RT5682_HPA_CP_BIAS_CTRL_MASK, RT5682_HPA_CP_BIAS_3UA); regmap_update_bits(rt5682->regmap, RT5682_CHARGE_PUMP_1, - RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ); + RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ); regmap_update_bits(rt5682->regmap, RT5682_HP_CHARGE_PUMP_1, - RT5682_PM_HP_MASK, RT5682_PM_HP_HV); + RT5682_PM_HP_MASK, RT5682_PM_HP_HV); /* Soundwire */ regmap_write(rt5682->regmap, RT5682_PLL2_INTERNAL, 0xa266); @@ -3499,9 +3489,9 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) regmap_update_bits(rt5682->regmap, RT5682_SAR_IL_CMD_1, RT5682_SAR_POW_MASK, RT5682_SAR_POW_EN); regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL, - RT5682_POW_IRQ | RT5682_POW_JDH | - RT5682_POW_ANA, RT5682_POW_IRQ | - RT5682_POW_JDH | RT5682_POW_ANA); + RT5682_POW_IRQ | RT5682_POW_JDH | + RT5682_POW_ANA, RT5682_POW_IRQ | + RT5682_POW_JDH | RT5682_POW_ANA); regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_2, RT5682_PWR_JDH, RT5682_PWR_JDH); regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2, @@ -3510,7 +3500,7 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) reinit: mod_delayed_work(system_power_efficient_wq, - &rt5682->jack_detect_work, msecs_to_jiffies(250)); + &rt5682->jack_detect_work, msecs_to_jiffies(250)); /* Mark Slave initialization complete */ rt5682->hw_init = true; @@ -3527,7 +3517,7 @@ EXPORT_SYMBOL_GPL(rt5682_io_init); #endif static int rt5682_i2c_probe(struct i2c_client *i2c, - const struct i2c_device_id *id) + const struct i2c_device_id *id) { struct rt5682_platform_data *pdata = dev_get_platdata(&i2c->dev); struct rt5682_priv *rt5682; @@ -3597,7 +3587,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, rt5682_calibrate(rt5682); ret = regmap_multi_reg_write(rt5682->regmap, patch_list, - ARRAY_SIZE(patch_list)); + ARRAY_SIZE(patch_list)); if (ret) dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); @@ -3643,27 +3633,26 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, } regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_1, - RT5682_LDO1_DVO_MASK | RT5682_HP_DRIVER_MASK, - RT5682_LDO1_DVO_12 | RT5682_HP_DRIVER_5X); + RT5682_LDO1_DVO_MASK | RT5682_HP_DRIVER_MASK, + RT5682_LDO1_DVO_12 | RT5682_HP_DRIVER_5X); regmap_write(rt5682->regmap, RT5682_MICBIAS_2, 0x0380); regmap_update_bits(rt5682->regmap, RT5682_GPIO_CTRL_1, - RT5682_GP4_PIN_MASK | RT5682_GP5_PIN_MASK, - RT5682_GP4_PIN_ADCDAT1 | RT5682_GP5_PIN_DACDAT1); + RT5682_GP4_PIN_MASK | RT5682_GP5_PIN_MASK, + RT5682_GP4_PIN_ADCDAT1 | RT5682_GP5_PIN_DACDAT1); regmap_write(rt5682->regmap, RT5682_TEST_MODE_CTRL_1, 0x0000); regmap_update_bits(rt5682->regmap, RT5682_BIAS_CUR_CTRL_8, - RT5682_HPA_CP_BIAS_CTRL_MASK, RT5682_HPA_CP_BIAS_3UA); + RT5682_HPA_CP_BIAS_CTRL_MASK, RT5682_HPA_CP_BIAS_3UA); regmap_update_bits(rt5682->regmap, RT5682_CHARGE_PUMP_1, - RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ); + RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ); regmap_update_bits(rt5682->regmap, RT5682_HP_CHARGE_PUMP_1, - RT5682_PM_HP_MASK, RT5682_PM_HP_HV); + RT5682_PM_HP_MASK, RT5682_PM_HP_HV); regmap_update_bits(rt5682->regmap, RT5682_DMIC_CTRL_1, - RT5682_FIFO_CLK_DIV_MASK, RT5682_FIFO_CLK_DIV_2); + RT5682_FIFO_CLK_DIV_MASK, RT5682_FIFO_CLK_DIV_2); INIT_DELAYED_WORK(&rt5682->jack_detect_work, - rt5682_jack_detect_handler); + rt5682_jack_detect_handler); INIT_DELAYED_WORK(&rt5682->jd_check_work, - rt5682_jd_check_handler); - + rt5682_jd_check_handler); if (i2c->irq) { ret = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL, @@ -3671,12 +3660,11 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, | IRQF_ONESHOT, "rt5682", rt5682); if (ret) dev_err(&i2c->dev, "Failed to reguest IRQ: %d\n", ret); - } return devm_snd_soc_register_component(&i2c->dev, - &soc_component_dev_rt5682, - rt5682_dai, ARRAY_SIZE(rt5682_dai)); + &soc_component_dev_rt5682, + rt5682_dai, ARRAY_SIZE(rt5682_dai)); } static void rt5682_i2c_shutdown(struct i2c_client *client) From patchwork Thu Apr 30 08:22:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11519437 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 8E93B14B4 for ; Thu, 30 Apr 2020 08:26:13 +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 25B9720784 for ; Thu, 30 Apr 2020 08:26:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="oiFYvc7l"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="uJ9oa9vq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25B9720784 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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 84CA616A2; Thu, 30 Apr 2020 10:25:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 84CA616A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235171; bh=+/6KpuAI5OnaH1+1INwZBtm3jDTuiqntf9j7SGav3go=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=oiFYvc7l+5fBMCNmp+FiRT7QLUjZY6Ln6xJlqyTG3oYQlGIeDBfgR90rcWb0YJ1KO eX6LpoA7xaWis3/GVjjbgCQRYexRKotn7XFVxMLtn3yyQPr0ITZE1u6fv+qh7cUuw1 9PHv5dadrFTf/ZQRf3L/q6UZgDK9bFSw2xoI9HQY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 013D3F802A8; Thu, 30 Apr 2020 10:23:01 +0200 (CEST) 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 0AC4CF802A0; Thu, 30 Apr 2020 10:22:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C8AF5F80299 for ; Thu, 30 Apr 2020 10:22:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C8AF5F80299 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="uJ9oa9vq" Received: by mail-yb1-xb4a.google.com with SMTP id i13so6783948ybl.13 for ; Thu, 30 Apr 2020 01:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=QAhamvk4O2Zfa+EjtB3QZix8CErM5lewhJjCrqGiG5U=; b=uJ9oa9vq1OeIFOfRXkMQzsWiPrjME2C//jSl5p+G95D9I3FqA+0s/BJRZPwQ8VyClm 9rvLixnHU3Ed+Iq3mvcFA9nB+n/rSm0LPNr4PQJw5UVXD0mGQDKXuthzBMQwgpnw5oHE 1cKVwYtZ/h1z9dZZ5HD3OQJPO8NRj9LH5Y4yodBCLuS0v1DYvZu6a9iQ0wLd8Vc2wJkA vjBmwppc8sTrIgi4S+Nu/zgRyNcy6jeTbiZIqo35eMUnTKmQYs2cxJr8mpKXQlOqHy+p X+ksrAG1Xh4ooNAwsbQHd2KkRvk+yynB6X16dnNriTNgt/3TFp9m61hGNSzHFjZwwdpE atFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=QAhamvk4O2Zfa+EjtB3QZix8CErM5lewhJjCrqGiG5U=; b=Ptv3LdO0vVI7C5Nhs7N08lepL46xSRsVxhWPOjhV//13FgrELcmLctU88NVjTZVPnf Qkted2xcAP07C7eAJ93xctfrgJ5IqVPrcAKZrONOHg2+gXyEgvNTJ4uzvG0bEpfEc6St MrrEVfT4AAXWIgakITXisnAoE4NmQedzkK5GH8Qk7y6Va6w0foqd6fLiEZ11Er54GdIN dNkGEhTdREhmZpj4bTcTZF43ycn2GJr7kXm7QpfkUzjj7akZIepZr73fTMDXUam9HrSi LTcbBQzrGnzN2ye0Xnj2i/+NdmyO8Qw31DyglbYW/mLYFKvjYh6xd4eYqKZ089rM0TnA fn7w== X-Gm-Message-State: AGi0PuacK6nbQ9eoysjcS9MjzQrmOXQX0tEcpjZGmjY9c6s2YeA6Ydrk /rPK3ggSnyMFbmPxfY4ioL4WvwtBeXo5 X-Google-Smtp-Source: APiQypIQo7EcrMYmhrDQCSdNkKaR4g+3RNIhpbhobADhH4JEuN8CHqCIhP3spY4twrMnzqP/VZnh+Q1G6o5B X-Received: by 2002:a25:ced3:: with SMTP id x202mr4048625ybe.164.1588234970687; Thu, 30 Apr 2020 01:22:50 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:28 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-4-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 3/6] ASoC: rt5682: remove empty default case From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org 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" Removes empty default case. Also adds a missing break statement. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index 7a38028f5e10..d38b2e8a7f43 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -950,6 +950,7 @@ static int rt5682_headset_detect(struct snd_soc_component *component, break; default: rt5682->jack_type = SND_JACK_HEADPHONE; + break; } } else { rt5682_enable_push_button_irq(component, false); @@ -1526,9 +1527,6 @@ static int rt5682_hp_event(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, RT5682_DAC_ADC_DIG_VOL1, 0x00c0, 0x0000); break; - - default: - return 0; } return 0; @@ -1550,9 +1548,6 @@ static int set_dmic_power(struct snd_soc_dapm_widget *w, /*Add delay to avoid pop noise*/ msleep(delay); break; - - default: - return 0; } return 0; @@ -1576,9 +1571,6 @@ static int rt5682_set_verf(struct snd_soc_dapm_widget *w, snd_soc_component_update_bits(component, RT5682_PWR_ANLG_1, RT5682_PWR_FV2, 0); break; - - default: - break; } break; @@ -1596,14 +1588,8 @@ static int rt5682_set_verf(struct snd_soc_dapm_widget *w, RT5682_PWR_ANLG_1, RT5682_PWR_FV2, RT5682_PWR_FV2); break; - - default: - break; } break; - - default: - return 0; } return 0; @@ -2483,8 +2469,7 @@ static int rt5682_set_bias_level(struct snd_soc_component *component, regmap_update_bits(rt5682->regmap, RT5682_PWR_ANLG_1, RT5682_PWR_BG, 0); break; - - default: + case SND_SOC_BIAS_ON: break; } From patchwork Thu Apr 30 08:22:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11519439 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 A115714DD for ; Thu, 30 Apr 2020 08:26:52 +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 38DFD20784 for ; Thu, 30 Apr 2020 08:26:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="f/RCpUl7"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="rRGqA7JZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38DFD20784 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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 EF0981694; Thu, 30 Apr 2020 10:26:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EF0981694 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235210; bh=r7QPJFsBmb5bBMH5TAYZgtgR/TJ+H0D0gtfu6SMYTKI=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=f/RCpUl74uCvzEIUlsjW5cEEo+syb0dv9KpZJiaCS40ICMlYzycs/Li6Yfby/oUsQ 3T1Bt4TZGh4yo/pXvj94mbmdCjg0hkmQR1gxCLNvRqGJIBSs4kkn0W3qjQoGtzXqI5 iN+7iq8q2AVnTVMmxyOMrCiVOm/A+ZDAW1Zb9yfU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0BBAEF802C2; Thu, 30 Apr 2020 10:23:04 +0200 (CEST) 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 DAD18F802A0; Thu, 30 Apr 2020 10:22:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ECF35F8029A for ; Thu, 30 Apr 2020 10:22:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ECF35F8029A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="rRGqA7JZ" Received: by mail-yb1-xb4a.google.com with SMTP id h185so6859280ybg.6 for ; Thu, 30 Apr 2020 01:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=grXX/zNEQT8tX1//Vo8J6acH4d/plf8sUJ7kVimoPtU=; b=rRGqA7JZ80BLPpljGg6xDSzjLfY2GYLObc0fSocJNhoZD5zamqZQUCT8dTUOV47Ms9 xsB5TU30rlWWs8w5jkn25Bg2AK5SXg2B07UDcnFUhaUp32nYgTfpD7D2eNiEGNs5XaB0 xdSoJYqVmtH/l6qzUI+HgwrwOeoFQIkh58bIX1W9oqKj1YJP+BmniCbNPuONgtxHRa/J wZ29oooArGCoNK+0X7E1hXB6FPOpPOfoLuryBbQWVODKf9uQA1Kj0F+wrbIOCuKzRJNz KsT/V9Bc9okXuP+RAGAM5+yF4oFpcgjs69C4Srztc0bifQOhMK55XfrerJRuMGWKiAs4 7BCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=grXX/zNEQT8tX1//Vo8J6acH4d/plf8sUJ7kVimoPtU=; b=QYGy+aA+7sf7O11pXjw7eubZeACsEzCoJPKmUhpBfxZN/Iwq2hAfy8keVlvXhRMa+B BupbKiqcSj75Et7jsWdIYaDIpGlvL6feu2nDeemrkVNtOsY4yRU+YAe32imgcaIC1Fsw DYKniLdrJx2mF4XZTNlDzLEPb3qgb5p5UCfZgtQevZXl0AN/+4Bk2GXY4jzUWIULlSqT pHQQT46yH2HYQgLbY7AJJWJXNHz+hJ2AMjh8x4F3Lo+9j+uDraoZwmW5q03m7iH+r3qr EsfKrF5VEUbpx/9rpQ1PEDsyH0AWHKGhR/mQQppTgyLmu83rTEQW4hcWfgZA3mVXm/fK m+pw== X-Gm-Message-State: AGi0PuZLr6QHPfjIyWNUOh0GK07KOcNs41rRMUpT3uaVV/ZFhOqjxWPl QSq7zohh5OolSl9ZvdhSW2s2+pQdqhm7 X-Google-Smtp-Source: APiQypIE+KmbkbjcwYJQHKCqulNArhl3h+VK26SxchorERYvcF+2jZ38L4ju+VGSkCWK2NXGu3a2yYp9H4Ra X-Received: by 2002:a25:af4a:: with SMTP id c10mr4175960ybj.270.1588234974300; Thu, 30 Apr 2020 01:22:54 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:29 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-5-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 4/6] ASoC: rt5682: replace message printing from pr_() to dev_() From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org 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" Replaces message printing from pr_() to dev_(). Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index d38b2e8a7f43..bfe542dcc7ba 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -857,7 +857,7 @@ static int rt5682_button_detect(struct snd_soc_component *component) val = snd_soc_component_read32(component, RT5682_4BTN_IL_CMD_1); btn_type = val & 0xfff0; snd_soc_component_write(component, RT5682_4BTN_IL_CMD_1, val); - pr_debug("%s btn_type=%x\n", __func__, btn_type); + dev_dbg(component->dev, "%s btn_type=%x\n", __func__, btn_type); snd_soc_component_update_bits(component, RT5682_SAR_IL_CMD_2, 0x10, 0x10); @@ -1189,7 +1189,8 @@ static int rt5682_div_sel(struct rt5682_priv *rt5682, int i; if (rt5682->sysclk < target) { - pr_err("sysclk rate %d is too low\n", rt5682->sysclk); + dev_err(rt5682->component->dev, + "sysclk rate %d is too low\n", rt5682->sysclk); return 0; } @@ -1206,7 +1207,8 @@ static int rt5682_div_sel(struct rt5682_priv *rt5682, } if (target * div[i] < rt5682->sysclk) - pr_err("sysclk rate %d is too high\n", rt5682->sysclk); + dev_err(rt5682->component->dev, + "sysclk rate %d is too high\n", rt5682->sysclk); return size - 1; } @@ -3272,7 +3274,7 @@ static void rt5682_calibrate(struct rt5682_priv *rt5682) } if (count >= 60) - pr_err("HP Calibration Failure\n"); + dev_err(rt5682->component->dev, "HP Calibration Failure\n"); /* restore settings */ regmap_write(rt5682->regmap, RT5682_PWR_ANLG_1, 0x02af); @@ -3391,7 +3393,7 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) regmap_read(rt5682->regmap, RT5682_DEVICE_ID, &val); if (val != DEVICE_ID) { - pr_err("Device with ID register %x is not rt5682\n", val); + dev_err(dev, "Device with ID register %x is not rt5682\n", val); return -ENODEV; } @@ -3562,7 +3564,8 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, regmap_read(rt5682->regmap, RT5682_DEVICE_ID, &val); if (val != DEVICE_ID) { - pr_err("Device with ID register %x is not rt5682\n", val); + dev_err(&i2c->dev, + "Device with ID register %x is not rt5682\n", val); return -ENODEV; } From patchwork Thu Apr 30 08:22:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11519441 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 3FD6E14B4 for ; Thu, 30 Apr 2020 08:27:32 +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 CAFDD20784 for ; Thu, 30 Apr 2020 08:27:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="MdGOK5HV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="RUEbkkoJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAFDD20784 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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 2A8FF168F; Thu, 30 Apr 2020 10:26:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2A8FF168F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235250; bh=hQd95vleHDzw9hFvqAOtdCrLVQ3RCFYHWmtV+Xbf+cQ=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MdGOK5HV06J2txPTGQrsCAaja9yluxQb2gqN2568QJAj1RdbJ4B4BqWdhMQAylWby 2G2W6AFc0lc77vKJX7dGFhBd6NDj6vxhrHsHpMx3HoYlY/d1Nzyr6vEp0zLtZnaGWM Hv3NUpV7UJjAC3ELcL3DGnl1yo3aVu7qowAz32LE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 61791F802D2; Thu, 30 Apr 2020 10:23:07 +0200 (CEST) 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 7F6F4F802D2; Thu, 30 Apr 2020 10:23:04 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 422ADF802BD for ; Thu, 30 Apr 2020 10:23:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 422ADF802BD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RUEbkkoJ" Received: by mail-qv1-xf4a.google.com with SMTP id et5so5646007qvb.5 for ; Thu, 30 Apr 2020 01:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=rV3n/GzyDJJeYWEHRQOjMW82xxTBqbQrIp/TzZObPR4=; b=RUEbkkoJbg76NpQxWCQwI/0z0oa56+abUUXNTVQo9I7mXAWqBn1+jd5Y0kRrAKdkaL vVz66FTE//h31GBAcd0hzgvPOvvHHOgBEaDlVbD7MlyyUWKEBeVF4o5+ajFve2UtVb7D bcWHaGlEnwk3ihiqizbwU3QXqmGWcx5Zyr7Hs5M2LgrLKIvGWMWx064DT+P3R1/9zI63 nFShvJmwg+HnDZT7ujOWhojHGAdc6gZ33IHEbFm+pmC+qmvAuRys2D7L+3ZLLX3nE/BA AJZSatcz9KOY5OHNAzfXWwowU0wwUaZNL4h5tE1OvM5l7NFeozatXYPH2UQ92SIJkBzN d30Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=rV3n/GzyDJJeYWEHRQOjMW82xxTBqbQrIp/TzZObPR4=; b=IdHmqoqcPSFuv4SFdikjPnD3xn0svXoWk3spmqVcLJr2zhb25XwwZxvhOsCwRGkmwq 4B6UhritmkmZU8rdsc4Rln4YgYKPPQIgyd1fbcpSiGXZ+cCDjn2kdCVZcP2QSboFLAWI fNfrBh1dJpsMRSxOZ/IjPyVFNsg8/5oRzFxGNxrqDcStVIRd8t5uRJL8fn7NESgMqd8s 7/JhTtqlHwC2f4VL14XzkbAfKGOuUzor9k+nMCpJ9vnWEm2zJ8Cle2qaLoh53E+T84lF MjL0IXutBNrwiNTk2V1rrOGzJa95DN1p9vuPrYVTP/Ga+6Gdp0K9Yj8OM/ZqzavP+2aL nNIA== X-Gm-Message-State: AGi0PubzwT37Lcs4bbIfg/rXi+oTN0OzWr/d+yK4cAQSPwxValjkzNe7 xEEQwh0xZ295YoeJzHqdarbs4Hv5GjBD X-Google-Smtp-Source: APiQypIg/GHORj2Fr/8tMqMl7ByOwJjkMqLR9Ff4We6VzkkQtY8X+XOzkdEImxKYLSHrf66GnRMtMKy+mx2I X-Received: by 2002:a0c:8061:: with SMTP id 88mr1846383qva.212.1588234977983; Thu, 30 Apr 2020 01:22:57 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:30 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-6-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 5/6] ASoC: rt5682: remove duplicate rt5682_reset() calls From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org 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" Removes duplicate rt5682_reset() calls. rt5682_calibrate() calls rt5682_reset() anyway. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index bfe542dcc7ba..19fb9f1d8f49 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -3416,8 +3416,6 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave) pm_runtime_get_noresume(&slave->dev); - rt5682_reset(rt5682); - if (rt5682->first_hw_init) { regcache_cache_only(rt5682->regmap, false); regcache_cache_bypass(rt5682->regmap, true); @@ -3569,8 +3567,6 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, return -ENODEV; } - rt5682_reset(rt5682); - mutex_init(&rt5682->calibrate_mutex); rt5682_calibrate(rt5682); From patchwork Thu Apr 30 08:22:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11519445 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 EB96814B4 for ; Thu, 30 Apr 2020 08:27:53 +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 8095E20784 for ; Thu, 30 Apr 2020 08:27:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="J71maY2S"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="bV+QKGRA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8095E20784 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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 DE4C51689; Thu, 30 Apr 2020 10:27:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE4C51689 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1588235272; bh=5fB3+K47H7NlKHeXFfwi1dM8Q0oNd8xdDPgWa4m/H54=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=J71maY2Ssaf/jfBBx4F2eTzyNqkUXOqMVm/LdoYvN231lvSQF1AhYXzZoPA2EGvGI Qsz7bsBihM6cbM4W1uWrl24SLhp++a+Eu+tJIszBfUPytOHCFvccwJIlbWAb1S7bDB l+Ao7gGzRK6eTGanjHhwSDgUCwIbfjM33pv9IDJU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 08253F802DF; Thu, 30 Apr 2020 10:23:10 +0200 (CEST) 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 443E0F802E0; Thu, 30 Apr 2020 10:23:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_NONE,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 90D20F802BC for ; Thu, 30 Apr 2020 10:23:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 90D20F802BC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="bV+QKGRA" Received: by mail-qv1-xf4a.google.com with SMTP id bm3so5674943qvb.0 for ; Thu, 30 Apr 2020 01:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=XVssmcUVddcBidhvz5kFSAVQSpL+gm7QgTGDD8dkeuQ=; b=bV+QKGRAgD3aTwZRxOJpx3+9xfL9bC88uaMWDnd9v4pn2gNkJRF/bautGarRcwtA23 non5+DCQWOabmRRz4IGKFh0upYvXOl92UNQgid7P0K9U8aFexNEUFqZkVYDeE+yBNGk2 1UlqKBU6c7xQ46pDM8/8fgjLpq+WPF4ewv2ly/QNKt3hkY8GYphOtMjogV1L4kh3Z78B eNZf1KEirM+r6saILEIQITdHxmOhEbJPAcaJnm/I9VfU7Hg07Alo+ZZax94FhG+JeFiE bm4cVSwGuzPuj/dESojXrL2kTzsOSuDQknPwVbnNKT/6smsLuIjYhsYEE8TqrFCPQ3ln W2PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=XVssmcUVddcBidhvz5kFSAVQSpL+gm7QgTGDD8dkeuQ=; b=ssuGm72EQalDYSaAZVC2O+EiIhnq4hV3U99TehstNrO7nu88x77V9sznsAuhg4Wprr wZH67RRiETYq9DqmUpNJk6nrXsyoPaHQwLA2D/oxx/GY12ofBUgs2ubD/qOOpegDqOVk BIHEAFgDrhCyuj4L0ohsmj++YSsNdKtfeHjNESifYLcdUhiLElC3wU3D1nhMXETe4VKT g/k510yatgVZMzE8nB07y3KqYsU5lqOr+L6bfrFUAWezdh8fpoy1R4nq+d1wim5n8+/9 XQDH5ns4Fsr1XILPyEW+rfzWhi0YvnFLyL5KCx6Qh676SSsxc26ameuD9AIXQENalOyq +8Ug== X-Gm-Message-State: AGi0PuaWoFPiwquT7oQES9bcwKDu/BdLz9KGMduET4ziXTchXwATgabG L6z+ydRWIEhHtEweJvbRRww0FTG7eau+ X-Google-Smtp-Source: APiQypLxXBaRVULdlxMtwVhZe0TJmdqYrYQDwkLoSJiaL4kVNuo+i6gaQe0cDELTFhIaZnSenPmb1wUGeGen X-Received: by 2002:a0c:f1d1:: with SMTP id u17mr1870971qvl.146.1588234981615; Thu, 30 Apr 2020 01:23:01 -0700 (PDT) Date: Thu, 30 Apr 2020 16:22:31 +0800 In-Reply-To: <20200430082231.151127-1-tzungbi@google.com> Message-Id: <20200430082231.151127-7-tzungbi@google.com> Mime-Version: 1.0 References: <20200430082231.151127-1-tzungbi@google.com> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog Subject: [PATCH 6/6] ASoC: rt5682: remove unwanted btn_type assignment From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org 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 following dev_err() is intended to print unexpected btn_type. Removes the unwanted btn_type assignment. Signed-off-by: Tzung-Bi Shih --- sound/soc/codecs/rt5682.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index 19fb9f1d8f49..5d3b11756a34 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -1134,7 +1134,6 @@ static void rt5682_jack_detect_handler(struct work_struct *work) case 0x0000: /* unpressed */ break; default: - btn_type = 0; dev_err(rt5682->component->dev, "Unexpected button code 0x%04x\n", btn_type);