From patchwork Mon Nov 27 18:52:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 119772 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp2100393edl; Mon, 27 Nov 2017 10:54:19 -0800 (PST) X-Google-Smtp-Source: AGs4zMZgdvviMFpSEOo2jhPN96Jg7NuDIhXwPlmfXfsmU5l2k5T39BQksxDzpCLpfVqipYsGC2Jj X-Received: by 10.223.144.36 with SMTP id h33mr12952283wrh.180.1511808859356; Mon, 27 Nov 2017 10:54:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511808859; cv=none; d=google.com; s=arc-20160816; b=Iz2ALAxqt6RjdRX5RxwOLc0pPc10H0LRkDE5AUnwFXsTBsrc3WWo7VMcMu0WmMvkFG M1ZlZsimL2LqcgC6i2ihp5mkwibQe7w4pAQUAMBehmBBK4THUGLFjA2l2RpThvm2qmyJ 2OK2G4/n/wCaYcVGaS11oxsGYke56eSuirnNs7WbUeFNRIUS7vppGymVbpx7xtdFfmkd wUsAszqqV5lob4GfNmT89LhgMQGzv4jn4QLEyN82ifDHyHvOEAS37R2lB8YbyH5RYAXo UG3PfT6TAkauLm/w2iZN4vMbtmDnRCka4wvDDuLHgnhu3TDY2WgDUXKRyaSHltuTdcUK GnIA== 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=D6rvlDErIHEUk4uZXY2rSYshsfCYIz0px3f6Xfmhr9Y=; b=Odehqh9JEFfXYbUassYe14tdjMZZHosq9cD93J24niKPbhN9Kt5n8riDRXJV8gQgtj qDoDDriL3zQpxOA9hYn8tHLUQuXlHSJgru5F8TgoHWDkIbXZGEcTjE2m5YgqgTnTky9X 7ZTXnXPkCgp8SHBN/WxVmCS3BAHTfYc8Ca/YfW9ih/cwfk8RJv820Z+WS7GqgG0bM/Kv soK467hDFE0DOHHNPv/E4EuceLEv+yQAA03eYuRjhxD0pxAGRB5z5FsT1xOxpXdC0Pus nzVbc86q/dowouq3YV5NLISM6yqLJ/nKrdfZF0wC5KQwcW1K1jV19FjGT0mpkLvzBt6Z +kCQ== 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=EnNJI9HH; 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 a20si1374429wrf.316.2017.11.27.10.54.19; Mon, 27 Nov 2017 10:54:19 -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=EnNJI9HH; 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 21A722675B2; Mon, 27 Nov 2017 19:52:30 +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 7F95F2675AD; Mon, 27 Nov 2017 19:52:29 +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 68123267568 for ; Mon, 27 Nov 2017 19:52:18 +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=mWwHOlSGJxwIEkdnM69i6dKDjafblLsa8J0ytgk0z1s=; b=EnNJI9HH8uVu g7JlfRsZc13Y7G/dpOft3UUY7k/gC/l47GX8gR3tHrY3zGZbPf43SPySIlW5Ak7rN54Vry5WWVMf5 rZHTJibYSjIGjqt8jqd03nVEAciBOHXoNRcs93Gxz1X1Lm9bAxGM0mO6r1lNnCCNq1ruQ6rgKVRlU 5uLmc=; 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 1eJOVr-0006zu-9G; Mon, 27 Nov 2017 18:52:15 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eJOVq-0006uG-Sc; Mon, 27 Nov 2017 18:52:14 +0000 From: Mark Brown To: Kuninori Morimoto In-Reply-To: <87efrrm11c.wl%kuninori.morimoto.gx@renesas.com> Message-Id: Date: Mon, 27 Nov 2017 18:52:14 +0000 Cc: alsa-devel@alsa-project.org, Mark Brown , Lars-Peter Subject: [alsa-devel] Applied "ASoC: don't use codec hw_write on tlv320dac33" 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 codec hw_write on tlv320dac33 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 ce9544dc8f9a83f9e8ff08eca30821edbe51d177 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 9 Nov 2017 00:19:48 +0000 Subject: [PATCH] ASoC: don't use codec hw_write on tlv320dac33 uda1380 driver is using codec hw_write/control_data, but it is redundant code. This patch cleanup these Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320dac33.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 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/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index 5b94a151539c..80a26418827c 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -121,7 +121,7 @@ struct tlv320dac33_priv { unsigned int uthr; enum dac33_state state; - void *control_data; + struct i2c_client *i2c; }; static const u8 dac33_reg[DAC33_CACHEREGNUM] = { @@ -200,7 +200,7 @@ static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, /* If powered off, return the cached value */ if (dac33->chip_power) { - val = i2c_smbus_read_byte_data(codec->control_data, value[0]); + val = i2c_smbus_read_byte_data(dac33->i2c, value[0]); if (val < 0) { dev_err(codec->dev, "Read failed (%d)\n", val); value[0] = dac33_read_reg_cache(codec, reg); @@ -233,7 +233,7 @@ static int dac33_write(struct snd_soc_codec *codec, unsigned int reg, dac33_write_reg_cache(codec, data[0], data[1]); if (dac33->chip_power) { - ret = codec->hw_write(codec->control_data, data, 2); + ret = i2c_master_send(dac33->i2c, data, 2); if (ret != 2) dev_err(codec->dev, "Write failed (%d)\n", ret); else @@ -280,7 +280,7 @@ static int dac33_write16(struct snd_soc_codec *codec, unsigned int reg, if (dac33->chip_power) { /* We need to set autoincrement mode for 16 bit writes */ data[0] |= DAC33_I2C_ADDR_AUTOINC; - ret = codec->hw_write(codec->control_data, data, 3); + ret = i2c_master_send(dac33->i2c, data, 3); if (ret != 3) dev_err(codec->dev, "Write failed (%d)\n", ret); else @@ -1379,8 +1379,6 @@ static int dac33_soc_probe(struct snd_soc_codec *codec) struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); int ret = 0; - codec->control_data = dac33->control_data; - codec->hw_write = (hw_write_t) i2c_master_send; dac33->codec = codec; /* Read the tlv320dac33 ID registers */ @@ -1499,7 +1497,7 @@ static int dac33_i2c_probe(struct i2c_client *client, if (dac33 == NULL) return -ENOMEM; - dac33->control_data = client; + dac33->i2c = client; mutex_init(&dac33->mutex); spin_lock_init(&dac33->lock);