From patchwork Mon Nov 27 18:51:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 119766 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp2098008edl; Mon, 27 Nov 2017 10:51:57 -0800 (PST) X-Google-Smtp-Source: AGs4zMa1e50Wmn72rpsNZ27XG1Ffnr79Djz/Uo4OR1aSUDZNeeH6Ln3CYSCO4M8uxXnQRznImM79 X-Received: by 10.28.137.80 with SMTP id l77mr16996796wmd.24.1511808717367; Mon, 27 Nov 2017 10:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511808717; cv=none; d=google.com; s=arc-20160816; b=xJa9JxJBahr87tnoVrTDBHtNeq3/vpSSVlSCu/p65x7ZaBhtOlDq652IMkNI63yDjN ZG5O+D8sE3AwPOkzRDSNoGJzQoWaKJfgrxmYLwqHzSKmAR+8PxSfCEuiW/K1TAg7+n6s JLYNX5tohauTncCguqh/n1DWEHdWsYX9wte9InA+l7eHyjOOrvEGxEd81ls38MvjBQ1y oCFxOVSeSYRxxHKkxII6oZmVB5+srkJRrRqu7aItaoXX+LaoMiFtuORiR4/eaIkGDYQ1 TEBujElizfb5XDu0E/leqFhL41RYTcIDHTaHzL/8RwKuXzwvJCyuO0UFKQ+jFGS0jwL5 Ae5Q== 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:arc-authentication-results; bh=Y1U0Y1Rytms3S+uMiyCIbf2bKcxPpxMu+8BPEXzSsPM=; b=R+8oVizm9H5449eHkdyVfQt2ZZCrCD7mgraRnRvkY7d9ZeSy9V9l4N/WuL5/rLiKD8 icueoPo6C8XkhMr8aksO5Kg7OQQkmWHNy+bmDuOJDdJsGogRWZuugqMJ3Z8KVYqtkE6a wKJbsdfWCOlMYxCb+k0sH3jAtwJFObNVOwVYVyBhXjLa41vrSfKZLP9+EXpsJnOg0Pgx +ZDv8NelP2O9tMFNHFNNvjOOxIdqHjSlvb2blD5OtU/EalTbyLnQyMso22eLKgpSoncq pQP4sp2h21yNYcGV+1E6pFOghexe/Zba8Z5Y8m+p0b2TGxqCulwphCa/LPK6IMpPwM1W chvw== 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=WGdKyg4c; 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 Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id a15si11342782wmg.202.2017.11.27.10.51.57; Mon, 27 Nov 2017 10:51:57 -0800 (PST) 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=WGdKyg4c; 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 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 1D00F267544; Mon, 27 Nov 2017 19:51:55 +0100 (CET) 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 6B8F3267547; Mon, 27 Nov 2017 19:51:53 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD 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 5A1EF266DCC for ; Mon, 27 Nov 2017 19:51:47 +0100 (CET) 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=DtOGieaORk0PU7w87JWG+8LB+F2jaTpvravRa3bHPJI=; b=WGdKyg4cI0QJ wxyAWI4NnB4HIC+j5boYTmETL81DiujLSex1BRro4tX0JRzN2eqSm9Hb57Bm3+QizIwDTPrh4TL89 xT7Gi0KELD1TdWUm1+F3sZngbbwGlYw69TAooEWCl0L/gmo2yfXGihNR1wnRlt+HMUX+6YC7oxOud p5GK0=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJOVK-0006yl-TU; Mon, 27 Nov 2017 18:51:42 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eJOVK-0006lV-2b; Mon, 27 Nov 2017 18:51:42 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87y3pzklfl.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 27 Nov 2017 18:51:42 +0000 Cc: alsa-devel@alsa-project.org, Mark Brown , Lars-Peter Subject: [alsa-devel] Applied "ASoC: don't use snd_soc_write/read on twl4030" 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: don't use snd_soc_write/read on twl4030 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 3bb0f7c31b1aedd0f85c675297031281799145d7 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 14 Nov 2017 01:05:17 +0000 Subject: [PATCH] ASoC: don't use snd_soc_write/read on twl4030 twl4030 doesn't use regmap nor reg_cache. Its write/read are done through twl4030_reg_write/read. This driver directly calling these functions, but sometimes using snd_soc_write/read. As part of cleanup, snd_soc_codec_driver::write, read will be removed soon. Then, write/read access through snd_soc_write/read will doesn't work on this driver, since it doesn't use regmap nor reg_cache. This patch replace snd_soc_write/read to twl4030_write/read. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/twl4030.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.15.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/twl4030.c b/sound/soc/codecs/twl4030.c index 90691701b082..8798182959c1 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c @@ -850,14 +850,14 @@ static int snd_soc_get_volsw_twl4030(struct snd_kcontrol *kcontrol, int mask = (1 << fls(max)) - 1; ucontrol->value.integer.value[0] = - (snd_soc_read(codec, reg) >> shift) & mask; + (twl4030_read(codec, reg) >> shift) & mask; if (ucontrol->value.integer.value[0]) ucontrol->value.integer.value[0] = max + 1 - ucontrol->value.integer.value[0]; if (shift != rshift) { ucontrol->value.integer.value[1] = - (snd_soc_read(codec, reg) >> rshift) & mask; + (twl4030_read(codec, reg) >> rshift) & mask; if (ucontrol->value.integer.value[1]) ucontrol->value.integer.value[1] = max + 1 - ucontrol->value.integer.value[1]; @@ -908,9 +908,9 @@ static int snd_soc_get_volsw_r2_twl4030(struct snd_kcontrol *kcontrol, int mask = (1<value.integer.value[0] = - (snd_soc_read(codec, reg) >> shift) & mask; + (twl4030_read(codec, reg) >> shift) & mask; ucontrol->value.integer.value[1] = - (snd_soc_read(codec, reg2) >> shift) & mask; + (twl4030_read(codec, reg2) >> shift) & mask; if (ucontrol->value.integer.value[0]) ucontrol->value.integer.value[0] = @@ -2195,8 +2195,6 @@ static int twl4030_soc_remove(struct snd_soc_codec *codec) static const struct snd_soc_codec_driver soc_codec_dev_twl4030 = { .probe = twl4030_soc_probe, .remove = twl4030_soc_remove, - .read = twl4030_read, - .write = twl4030_write, .set_bias_level = twl4030_set_bias_level, .idle_bias_off = true,