From patchwork Mon Jul 12 06:12:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 473003 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2690407jao; Mon, 12 Jul 2021 00:34:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKzDqcficaIK0Q/x0kZeexsSaDdq7/AF29VNOEPzbag5wzmZOPaCsOO0AyEjVeLi3N1UID X-Received: by 2002:a05:6402:d5a:: with SMTP id ec26mr15662119edb.4.1626075180500; Mon, 12 Jul 2021 00:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626075180; cv=none; d=google.com; s=arc-20160816; b=hGatU6nrJvfLAPowIQt183Alv6g+IQJ1Uz3OwrDcGmjqrGvRve/9Q0VB8MgQUcJetB wmXlYVdpoKNn6UEe/2qbtqgBXyxAMSbEW7fZt3Q9CicPWFLk+y6uh6ePIoiNgAhE8x5I Qnaw+7wjl7IDLf1nG3MccFbebs52aQzvdJpTAIrbJGwzrKaqqACQ2J9eTLiWiEuut0VA j2S01SCjTfbbS74PlZcLxsDI7slEgwypgtBvO6HLYlDuaE9qrpJvaMNtPQ4h9l9rh1iG 2y0+9BcQXs+sGoCmLNLvzu6vCh54Lff7TYi93tniBOmUNsjtipzb6OVpJreQbJ8TGWh3 vrPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=P01eZquUz9GWXGfZ/ey93RyuKDmiUhEkWyKWRQUlz7E=; b=A2ZQGOZGX33tnZ4yrRSOce7veNsCbKbKIT1W7dwoeThRHWWpGemhxrQYNi2yxvnNYG pmNJ8YxD0uFyFf88AlXhCQ5pZy6PyGM44v7mQ2qr+C7rG1V9zPTvdbG04W5qX1pe0WLn XIoUBuPM5DCtKA98VB+BCdkVe9wPU1cs+ia9Uifsy64Q8X4EiaSR26MrkHUzgSEOUU+A jOLDOXZGIjdv5EzudfWmt4MrSBsyOzFEh48OcVJrQubM0W0zUPQj/OV+8DAq2XKEqHp7 afWWWH17G18rXqP1OWx/L1X7fdcAjrO2sSzX1Rsac4UivUt9B9XJtHQxHJ5PgPt16Sq6 7BNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=odAtxMZn; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e9si16596658edv.146.2021.07.12.00.33.00; Mon, 12 Jul 2021 00:33:00 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=odAtxMZn; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245645AbhGLHdb (ORCPT + 12 others); Mon, 12 Jul 2021 03:33:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:43440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343571AbhGLH2e (ORCPT ); Mon, 12 Jul 2021 03:28:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C820561921; Mon, 12 Jul 2021 07:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626074645; bh=uuDOYGr39R0SKAOdikfpujbED331JVwA4d41fRH3ZSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=odAtxMZnkLm3qWLMM/ym7xLYrcBC98daUCBS2u8AOTrvKGMm3inNhIaEg1H3Q/zTc KMsaFjwQoGrt5JUADPxfdKK+AvO2CMLvpVW96hW8b33MgDegy5qIhrsKnIgX17EtQu yo09rlRMSVMV8sG/VIwKhPYFnenLVwNWez9S5Ixg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , Fabio Estevam , Mark Brown , Sasha Levin Subject: [PATCH 5.12 649/700] ASoC: fsl_spdif: Fix unexpected interrupt after suspend Date: Mon, 12 Jul 2021 08:12:12 +0200 Message-Id: <20210712061044.913234845@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shengjiu Wang [ Upstream commit a7a0a2feb957e446b2bcf732f245ba04fc8b6314 ] When system enter suspend, the machine driver suspend callback function will be called, then the cpu driver trigger callback (SNDRV_PCM_TRIGGER_SUSPEND) be called, it would disable the interrupt. But the machine driver suspend and cpu dai driver suspend order maybe changed, the cpu dai driver's suspend callback is called before machine driver's suppend callback, then the interrupt is not cleared successfully in trigger callback. So need to clear interrupts in cpu dai driver's suspend callback to avoid such issue. Fixes: 9cb2b3796e08 ("ASoC: fsl_spdif: Add pm runtime function") Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1624365084-7934-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_spdif.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.30.2 diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index e5d366b2a6a4..6d5e9c0acdb4 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -1429,6 +1429,9 @@ static int fsl_spdif_runtime_suspend(struct device *dev) struct fsl_spdif_priv *spdif_priv = dev_get_drvdata(dev); int i; + /* Disable all the interrupts */ + regmap_update_bits(spdif_priv->regmap, REG_SPDIF_SIE, 0xffffff, 0); + regmap_read(spdif_priv->regmap, REG_SPDIF_SRPC, &spdif_priv->regcache_srpc); regcache_cache_only(spdif_priv->regmap, true);