From patchwork Tue Sep 18 17:44:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 146933 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp163676ljw; Tue, 18 Sep 2018 10:45:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYaRgNY8IMwU8HpdkuEA9yQNDx70nCYOy4e620LFj3dvlteQed+boYJv2gk5pTSngHWcD+f X-Received: by 2002:a1c:398b:: with SMTP id g133-v6mr18226638wma.5.1537292703808; Tue, 18 Sep 2018 10:45:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537292703; cv=none; d=google.com; s=arc-20160816; b=Z+AvgKLja7rxEU7lTeapQcaoI+mpJaqX64sTuCIapJTrVSmmNYYe6FhlFiqLMZo1ya 4+JfeHYQPfJ1JXNF8/n8B8c8XfvUKzS/tdHtNUrPmbMfn6EOrJA9H2y1pbyNr0iS+WKA zOVsBUpQ4zpMpD9YAxQDGWFAzTmJhZxLYeIygur5dOqWHE7ZCSknid2rKL43ogp690fI TzGojNDlikwwTCDgB6WcDDr6bpuPmZ8qmcJir2WgEciE2oiyZUkiA8pglnw7xSuJgMIa TtP5jpbWahHI7eUMVxV/vt7HkVvYvOVEthco12chGxQHXwgMNK/nQzrbs+/RKvfJr47c UoAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to; bh=4u1UmpiQ5KjaXEQ7O9YfkRyl+1r2LS+F20t988FmrUI=; b=ODq5Ymj5H3pQD7lG2s65+m69EUv/bAw6DRIOsGUFZZVUfL16SOMZqP8kLx0gmHkHsT LNWwjuAKNsR90V2kukJ5bmAc+NV2XwD3ui8dZTEGr9/XsKZS6b52oQEbIlOCQTu3wBsh sDUy3vSX2llSA5sSNIzQkmVicuWnhKQMVuWC/1daxeRJMnz/efb2j/l9PYr/i2Qk7VSU CEyjgxu2dFSk4R2D9PAjKaQM6SOCR3dqGqVqZCzKsF3h+AFGuaAXCDnDW/ae59o8zCSx wY2wDFPPJwoiFIDlbUDlafhMz3rNAmJzMy68wTpfnqbnJRteCeuY0+tGl99QX7kBxUZf NHDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=jlhrY3p7; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id y11-v6si2108036wru.286.2018.09.18.10.45.03; Tue, 18 Sep 2018 10:45:03 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=jlhrY3p7; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 69B9426788E; Tue, 18 Sep 2018 19:45:01 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7B6E6267891; Tue, 18 Sep 2018 19:44:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 94B6C26788C for ; Tue, 18 Sep 2018 19:44:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=MPxM9hpYMEew3SUM9C+PrK+7xuHGYv4RXlIqG4BNyns=; b=jlhrY3p75UqV btdHZiIYgZ3ewcFVjVkrQ4Shn+NLi6F2SXWijlnbEJS2iKx6Y70WWttiNZnGVgjYKCDSX6s34+121 gpgGvB+pmdviHJ0fYvxtMOKFWAE0pvkS04Wdbp5xwZeu5RQL9S/byaBuTfgwA/FQv6v2RW3+c8Mcs otN9o=; Received: from [209.121.128.187] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2K3S-0003WR-Io; Tue, 18 Sep 2018 17:44:54 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 614B7440078; Tue, 18 Sep 2018 18:44:52 +0100 (BST) From: Mark Brown To: Shuming Fan In-Reply-To: <1537271513-5737-1-git-send-email-shumingf@realtek.com> Message-Id: <20180918174452.614B7440078@finisterre.ee.mobilebroadband> Date: Tue, 18 Sep 2018 18:44:52 +0100 (BST) Cc: oder_chiou@realtek.com, jack.yu@realtek.com, alsa-devel@alsa-project.org, lars@metafoo.de, lgirdwood@gmail.com, albertchen@realtek.com, broonie@kernel.org, flove@realtek.com Subject: [alsa-devel] Applied "ASoC: rt5682: Minor code modification" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: rt5682: Minor code modification has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 37efe23dcca3c59cee662f1c28835020bef31cc0 Mon Sep 17 00:00:00 2001 From: Shuming Fan Date: Tue, 18 Sep 2018 19:51:53 +0800 Subject: [PATCH] ASoC: rt5682: Minor code modification Minor code changes are: - improve the readability in patch list - add i2c remove function - regmap_register_patch changes to regmap_multi_reg_write Signed-off-by: Shuming Fan Signed-off-by: Mark Brown --- sound/soc/codecs/rt5682.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) -- 2.19.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index 18099668e960..340f90497d07 100644 --- a/sound/soc/codecs/rt5682.c +++ b/sound/soc/codecs/rt5682.c @@ -67,7 +67,7 @@ struct rt5682_priv { }; static const struct reg_sequence patch_list[] = { - {0x01c1, 0x1000}, + {RT5682_HP_IMP_SENS_CTRL_19, 0x1000}, {RT5682_DAC_ADC_DIG_VOL1, 0xa020}, }; @@ -2584,7 +2584,7 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, rt5682_calibrate(rt5682); - ret = regmap_register_patch(rt5682->regmap, patch_list, + ret = regmap_multi_reg_write(rt5682->regmap, patch_list, ARRAY_SIZE(patch_list)); if (ret != 0) dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); @@ -2659,11 +2659,17 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, } - return devm_snd_soc_register_component(&i2c->dev, - &soc_component_dev_rt5682, + return snd_soc_register_component(&i2c->dev, &soc_component_dev_rt5682, rt5682_dai, ARRAY_SIZE(rt5682_dai)); } +static int rt5682_i2c_remove(struct i2c_client *i2c) +{ + snd_soc_unregister_component(&i2c->dev); + + return 0; +} + static void rt5682_i2c_shutdown(struct i2c_client *client) { struct rt5682_priv *rt5682 = i2c_get_clientdata(client); @@ -2694,6 +2700,7 @@ static struct i2c_driver rt5682_i2c_driver = { .acpi_match_table = ACPI_PTR(rt5682_acpi_match), }, .probe = rt5682_i2c_probe, + .remove = rt5682_i2c_remove, .shutdown = rt5682_i2c_shutdown, .id_table = rt5682_i2c_id, };