From patchwork Fri Oct 24 06:00:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Hsu X-Patchwork-Id: 39409 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8FCF420341 for ; Fri, 24 Oct 2014 06:01:19 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id a1sf216283wgh.1 for ; Thu, 23 Oct 2014 23:01:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=gIbaRQHqe/a7UWY4Al2AWVpqxoMiyYvCmkJ+A8XfHAg=; b=X/xUr81+2sFpEkdCtqQ76ZUzmXUMGlnugD8c1WxpYM0RDO7SVYRI77oCMo97e+JJ1c izR2Xh6Xl0QGJlBg4s3+Rx5WnJot5DIzaIEKk0Xxt2itGmanRlbNlpcEP49mHR/myW+F PFLTP4gjfg5MQMFMGdk+zuwyB0Qz4+Mme5hB1ku/f25EvBfShQVlxzkjyk3c6Q+DAyAj gcgfSMSavhbJk8APhR+ptUgxsQVClMni9mO5Dp6eobhd+NvzhgNVagtO79TI35DJB7Ya fN5/jO5bbsazZcsYVi6c3gZFvgQQfwFv2peGclqXciwzeQ8iZkOI1H0+smHiCJhMvmBP /0zQ== X-Gm-Message-State: ALoCoQlUXDejovwISOo/K/SzmIOMlI+G2LrihwMGNH633W527zizGzfhBwGjkBNmgYqgrRfvwDL7 X-Received: by 10.112.163.229 with SMTP id yl5mr6613lbb.23.1414130478798; Thu, 23 Oct 2014 23:01:18 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.39 with SMTP id b7ls59999lae.38.gmail; Thu, 23 Oct 2014 23:01:18 -0700 (PDT) X-Received: by 10.112.142.200 with SMTP id ry8mr2171545lbb.26.1414130478568; Thu, 23 Oct 2014 23:01:18 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id kq1si5480227lac.31.2014.10.23.23.01.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Oct 2014 23:01:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id pn19so2294814lab.0 for ; Thu, 23 Oct 2014 23:01:18 -0700 (PDT) X-Received: by 10.152.29.8 with SMTP id f8mr2128310lah.56.1414130478482; Thu, 23 Oct 2014 23:01:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.84.229 with SMTP id c5csp375004lbz; Thu, 23 Oct 2014 23:01:17 -0700 (PDT) X-Received: by 10.66.248.104 with SMTP id yl8mr2647476pac.2.1414130476733; Thu, 23 Oct 2014 23:01:16 -0700 (PDT) Received: from Kraken ([124.219.7.128]) by mx.google.com with ESMTP id az17si3326330pdb.198.2014.10.23.23.01.15 for ; Thu, 23 Oct 2014 23:01:16 -0700 (PDT) Received-SPF: temperror (google.com: error in processing during lookup of xavier@kraken: DNS timeout) client-ip=124.219.7.128; Received: by Kraken (Postfix, from userid 1011) id 50D786A27AC; Fri, 24 Oct 2014 14:01:06 +0800 (CST) From: Xavier Hsu To: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, patches@linaro.org Cc: lars@metafoo.de, ckeepax@opensource.wolfsonmicro.com, Xavier Hsu , Andy Green Subject: [PATCHv5 8/9] ASOC: wm8971: use regcache_sync to replace snd_soc_cache_sync Date: Fri, 24 Oct 2014 14:00:34 +0800 Message-Id: <1414130435-14183-8-git-send-email-xavier.hsu@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1414130435-14183-1-git-send-email-xavier.hsu@linaro.org> References: <1414130435-14183-1-git-send-email-xavier.hsu@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: xavier.hsu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Xavier Hsu Signed-off-by: Andy Green --- sound/soc/codecs/wm8971.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c index 85314fb..751cd44 100755 --- a/sound/soc/codecs/wm8971.c +++ b/sound/soc/codecs/wm8971.c @@ -38,6 +38,7 @@ /* codec private data */ struct wm8971_priv { + struct regmap *regmap; /* MCLK */ unsigned int sysclk; struct snd_pcm_hw_constraint_list *sysclk_constraints; @@ -720,6 +721,7 @@ static int wm8971_mute(struct snd_soc_dai *dai, int mute) static int wm8971_set_bias_level(struct snd_soc_codec *codec, enum snd_soc_bias_level level) { + struct wm8971_priv *wm8971 = snd_soc_codec_get_drvdata(codec); u16 pwr_reg = snd_soc_read(codec, WM8971_PWR1) & 0xfe3e; switch (level) { @@ -731,7 +733,7 @@ static int wm8971_set_bias_level(struct snd_soc_codec *codec, break; case SND_SOC_BIAS_STANDBY: if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) - snd_soc_cache_sync(codec); + regcache_sync(wm8971->regmap); /* mute dac and set vmid to 500k, enable VREF */ snd_soc_write(codec, WM8971_PWR1, pwr_reg | 0x0140); @@ -865,7 +867,6 @@ static int wm8971_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct wm8971_priv *wm8971; - struct regmap *regmap; int ret; wm8971 = devm_kzalloc(&i2c->dev, sizeof(struct wm8971_priv), @@ -875,9 +876,9 @@ static int wm8971_i2c_probe(struct i2c_client *i2c, mutex_init(&wm8971->deemph_mutex); - regmap = devm_regmap_init_i2c(i2c, &wm8971_regmap); - if (IS_ERR(regmap)) - return PTR_ERR(regmap); + wm8971->regmap = devm_regmap_init_i2c(i2c, &wm8971_regmap); + if (IS_ERR(wm8971->regmap)) + return PTR_ERR(wm8971->regmap); i2c_set_clientdata(i2c, wm8971);