From patchwork Tue Sep 27 11:34:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Povi=C5=A1er?= X-Patchwork-Id: 12990475 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3DBBC07E9D for ; Tue, 27 Sep 2022 11:36:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C8C9D1F1; Tue, 27 Sep 2022 13:35:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C8C9D1F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1664278558; bh=g6EgBQsu7Hx6HNkg4vQlyFT638t277ViWzx84i/23rI=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=EHI0vb6ZnR+l1lTANr4RjmoXne+yGbAJyWlU5MWo4RGvcz7Os8wLy3+9/iRhJxgfR J/JmTIc5FJSLLTTUff1ZA6B1SMgYP3tQ92x2B/7/MFxxuiZbAioQoBeLPfPl8fh9Ld rJ9bLShnJVegoTOcbRx9fMWtOQA1/dX7ik2w74YQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4D515F80166; Tue, 27 Sep 2022 13:35:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A9AA3F800AA; Tue, 27 Sep 2022 13:35:06 +0200 (CEST) Received: from hutie.ust.cz (unknown [IPv6:2a03:3b40:fe:f0::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7DA47F800AA for ; Tue, 27 Sep 2022 13:35:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7DA47F800AA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=cutebit.org header.i=@cutebit.org header.b="Nwr09I/s" From: =?utf-8?q?Martin_Povi=C5=A1er?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1664278499; bh=nOoQhB339U5GGM36GHbGtBpVI5SaHkuDid0bhw4EnqY=; h=From:To:Cc:Subject:Date; b=Nwr09I/sqmPoJufDCxfV0CwuwcAg026CaPqliB8Oe3lX+CrBM0UrVDJPUK2yi5mTE v8fnko6E1l8dZp8T5Rv3h2rT8UYSLLgRUxfPi9FagnEeKVon6MGyq6OGD8EimtcO5k Zj2oZ7LspQSEulDJ4+BhsWOy2A8fK2xIZGoe8o6g= To: Liam Girdwood , Mark Brown Subject: [PATCH 1/3] ASoC: apple: mca: Trigger, not deassert, the peripheral reset Date: Tue, 27 Sep 2022 13:34:24 +0200 Message-Id: <20220927113426.49724-1-povik+lin@cutebit.org> MIME-Version: 1.0 Cc: =?utf-8?q?Martin_Povi=C5=A1er?= , alsa-devel@alsa-project.org, asahi@lists.linux.dev, Philipp Zabel , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Replace the deassertion of the peripheral's shared reset with the triggering of a pulse on it. This is what we should have been using all along as the platform's custom is not leaving the reset asserted on unused peripherals. Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Signed-off-by: Martin PoviĊĦer --- Cc: Philipp Zabel sound/soc/apple/mca.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/apple/mca.c b/sound/soc/apple/mca.c index 69643524796e..75925bfcf754 100644 --- a/sound/soc/apple/mca.c +++ b/sound/soc/apple/mca.c @@ -995,7 +995,7 @@ static void apple_mca_release(struct mca_data *mca) if (!IS_ERR_OR_NULL(mca->pd_dev)) dev_pm_domain_detach(mca->pd_dev, true); - reset_control_assert(mca->rstc); + reset_control_rearm(mca->rstc); } static int apple_mca_probe(struct platform_device *pdev) @@ -1049,12 +1049,12 @@ static int apple_mca_probe(struct platform_device *pdev) DL_FLAG_RPM_ACTIVE); if (!mca->pd_link) { ret = -EINVAL; - /* Prevent an unbalanced reset assert */ + /* Prevent an unbalanced reset rearm */ mca->rstc = NULL; goto err_release; } - reset_control_deassert(mca->rstc); + reset_control_reset(mca->rstc); for (i = 0; i < nclusters; i++) { struct mca_cluster *cl = &clusters[i];