Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp264280ybk; Tue, 12 May 2020 22:44:42 -0700 (PDT) X-Google-Smtp-Source: APiQypIUWV0l18C9gty4p4eu4wjZxfTxfj9dwm+h3pi8U8LACliKO9iYt8/smlNXe8EF/g3dCOvg X-Received: by 2002:a50:8750:: with SMTP id 16mr14808672edv.309.1589348682342; Tue, 12 May 2020 22:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589348682; cv=none; d=google.com; s=arc-20160816; b=EiseRh64dgLzeGwcJdCtArzbkqkvibaCpZ72gI3UNPchY/yF3oZgzkiUxQg7oo1vo9 MlfW+3Jzp4iRZKZg1dVMfgQPi4iziDm5/xt9uZZpqPKRVR4X05oYtz4kiv5ptbZImL4b OMcw6ZMSj6cGTJ9dAQFHthJbA5e/sXWJjHYzpbiJGZdzRVCvJXwU7g+uBxQmseN676za ycj5/qQOR9GR49FpPDKP9hK93dALls6UcZFXlIfinGtY04qku9uzAsN4wRdehRmVsOhh razZ3hdgCy/27OUjA0GUDTKKXq9CFXS9gHqbTZfvpZkTjvVvW0uQBS63LGp04Xk0do8v WOIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=Fo7J4b0cipYTZhJ8iS4B5Bfp9Y9IMBiJa6E7n63ayiU=; b=Wpmf0opW9Dmf/DsUoER13t7Tcl308KantFY5Xv+V/A77SqyYCo9tsUmXLuePt5IrYw JOjsLrXojTd9RES+meznWJtk75txVWxUbAmnuvhNnlyvuB8cyvGC8c9kKThWxsfx8NlL JJR6SKOkyGS8/dSbn4fj3Zes4c8+ZF7vju+77gNITApnOhzCkB36xSjBFsUw+JPCazZv 0/UtHQqEMSyUSc755zpaRk1+F95fzx3dsO5XB/oadjw3php/niwGcy3VYjkL2BuALnPw S2eNO2gMb8r6EArl3kpX1Af7W/mASZS7rytowF62nJB8Ccd3rQ6HgwVg02QZ0I6+q5Xc g+CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si8770567edy.541.2020.05.12.22.44.20; Tue, 12 May 2020 22:44:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728680AbgEMFks (ORCPT + 99 others); Wed, 13 May 2020 01:40:48 -0400 Received: from inva021.nxp.com ([92.121.34.21]:47614 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728097AbgEMFkr (ORCPT ); Wed, 13 May 2020 01:40:47 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 095C12007B4; Wed, 13 May 2020 07:40:46 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7D7E3201259; Wed, 13 May 2020 07:40:41 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 93F30402B4; Wed, 13 May 2020 13:40:35 +0800 (SGT) From: Shengjiu Wang To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, shengjiu.wang@nxp.com, tglx@linutronix.de, allison@lohutok.net, info@metux.net, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset Date: Wed, 13 May 2020 13:30:35 +0800 Message-Id: <1589347835-20554-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CLOCKING2 is non-volatile register, we need force clear the WM8962_SYSCLK_ENA bit after reset, for the value in cache maybe 0 but in hardware it is 1. Otherwise there will issue as below statement in driver. /* SYSCLK defaults to on; make sure it is off so we can safely * write to registers if the device is declocked. Fixes: c38b608504aa ("ASoC: wm8962: set CLOCKING2 as non-volatile register") Signed-off-by: Shengjiu Wang --- sound/soc/codecs/wm8962.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 0a2cfff44441..08d19df8a700 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -3798,8 +3798,8 @@ static int wm8962_runtime_resume(struct device *dev) /* SYSCLK defaults to on; make sure it is off so we can safely * write to registers if the device is declocked. */ - regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2, - WM8962_SYSCLK_ENA, 0); + regmap_write_bits(wm8962->regmap, WM8962_CLOCKING2, + WM8962_SYSCLK_ENA, 0); /* Ensure we have soft control over all registers */ regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2, -- 2.21.0