Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1428916pxb; Mon, 22 Feb 2021 01:24:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJx86HDdaX2J9Px9cDm+xOK42EDee3m1yg0f5htDJCKcdhub5wC9tFliKpt0Z+worj/D96xc X-Received: by 2002:a17:907:d21:: with SMTP id gn33mr20152135ejc.242.1613985882368; Mon, 22 Feb 2021 01:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613985882; cv=none; d=google.com; s=arc-20160816; b=KC9gYi/k47InbA/PwRHSAsoAgXy2SPSA5DdoMMaIjmvvSF93xzCP4f2pMYimyueygs DrnTDcVFIivx4NxFJ0uJKZyomaoLU5ZJ68dBuFcGI4YBYfnw4TYv4JOQrohBuVQmxFmi MyrjiywRKuNWWMZKBWF7Qtm+CE5E8mtq4tc7oPG243OSWKdGByjGHM5GV6zRE3Q4CHMs Jn+Ayq1UAN6WM70yKYS7OT5pWn3wdfBiSobKDxx/4I5X4urINkw3K5sl+DFAn+Yta4Nl 8PrHWj78Jwi4Lh7jznA60FMeunzmS1j4knU/zyLga09GR/Lz6JVltaRFRW5ZvoVZhOnR 9bZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=HuXyEWWgEEp2HgGsiYZfIclhgfqzVj0pAQw9o8IJcd8=; b=ORoVu/g2K+GTtN/Wquq43Cpbhh7yrvpg76NE6uzCMUAfZDEDKAHbLNbGqTo80Yvnhr Rs7/FMvxxuQEGnTY7dz9vcViUcP6nCujvIiAZqJgix79CYrWk5yyJX0Kb+7Qqk2Fhu1r +06U2kSKLin1TS0Spp5ygPD3K0wk6mYNIynu8uAe5Df8B7rub/POjBBmC57Rz0sSMR0Q duHSoES3jo5FrglLO/I68H66xd9Hpvl8iKP3NbfHAFEHot3mh8y6kUw9FaxzubF9JmQ6 MKvB9VMFTRNUf3aiqBgrJHNUO7bFLRMBwPxcip64m7TynRx36aTRwXVOeyk3j3H1W6Bq DDhw== 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 dp13si11068939ejc.304.2021.02.22.01.24.18; Mon, 22 Feb 2021 01:24:42 -0800 (PST) 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 S230073AbhBVJWq (ORCPT + 99 others); Mon, 22 Feb 2021 04:22:46 -0500 Received: from inva020.nxp.com ([92.121.34.13]:40132 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbhBVJWp (ORCPT ); Mon, 22 Feb 2021 04:22:45 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2F5781A020C; Mon, 22 Feb 2021 10:21:58 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id DB1F51A0050; Mon, 22 Feb 2021 10:21:52 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 2C98240291; Mon, 22 Feb 2021 10:21:46 +0100 (CET) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: fsl_xcvr: move reset assert into runtime_resume Date: Mon, 22 Feb 2021 17:09:50 +0800 Message-Id: <1613984990-5534-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Viorel Suman Move reset assert into runtime_resume since we cannot rely on reset assert state when the device is put out from suspend. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_xcvr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index dd228b421e2c..4857e0df8681 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1243,10 +1243,6 @@ static __maybe_unused int fsl_xcvr_runtime_suspend(struct device *dev) if (ret < 0) dev_err(dev, "Failed to assert M0+ core: %d\n", ret); - ret = reset_control_assert(xcvr->reset); - if (ret < 0) - dev_err(dev, "Failed to assert M0+ reset: %d\n", ret); - regcache_cache_only(xcvr->regmap, true); clk_disable_unprepare(xcvr->spba_clk); @@ -1262,6 +1258,12 @@ static __maybe_unused int fsl_xcvr_runtime_resume(struct device *dev) struct fsl_xcvr *xcvr = dev_get_drvdata(dev); int ret; + ret = reset_control_assert(xcvr->reset); + if (ret < 0) { + dev_err(dev, "Failed to assert M0+ reset: %d\n", ret); + return ret; + } + ret = clk_prepare_enable(xcvr->ipg_clk); if (ret) { dev_err(dev, "failed to start IPG clock.\n"); -- 2.27.0