From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 10521CD6E67 for ; Tue, 2 Jun 2026 10:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dQV4nNEmQmgA0EWVqBQzKPHqpXnZ2AGALaek2V1MFtU=; b=Q+mm1GvaY2YZ45 ugMK/iXBJU64x2ezHEnuY2fyH4OHlda6dr4Pk4eXTMyub2LSyzRyvPjkXJwXJ5uM7GaueCm2gPBcr ykxBa/E/m6krLMmTlzfv9CwlYudzsDFHIcNn1kw2/DyOAesJ39uDQ0GvHrTqmeRqh9R5qHZDXvRHv 5Gg1IMzLk5yuUNnJ3gm8uDvBLpSiLlhdwKe9fvI9YFKK/8GeAJVMASyMgJkxkcK9Wld9gNiIYynkI 0F76UItx7sUgUDwHRhfKMqn/N4wKip12xvNX/06GCO6Svxp02s/7PyEwS8rwcLtbjBeQvXPBdb4Db 7+x7IxHtmxw/4ZZ1wsrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUMAz-0000000CkTD-33KD; Tue, 02 Jun 2026 10:16:49 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUMAx-0000000CkRj-1I4O for linux-rockchip@lists.infradead.org; Tue, 02 Jun 2026 10:16:48 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2bf2e8ccca1so22878155ad.0 for ; Tue, 02 Jun 2026 03:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780395406; x=1781000206; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zlqWTxvd2nybMb9oOkq3B+WZ2+KSO9DV36s9D60SrZ0=; b=o/xhyL2hXom+YowGp67VwsUwDMCzLXbWKLlWAG0vFG+y/gpbgu4Ur/FmC58/NxjCTC 0eFwFiyfwgQ3x5scpAJZYJvYs7kpLlei8X5tWi8EcKOtm9l8XU7Vaimprts9yzEvP05L CJDhXXmqRxli2cRlsyZhF4nGkq0q0cJAQuPhzpsq2nP78XDV9TQErmswqW3dTKEfYl2b UCHulfA6tgBVKljJ3HwMHgBU12NVBwd2muMJlXvp1Lyv3Tnn5YWK3lwCdcv5d9ixvIel Cx1krt3efz5cO6FZCUzlPeTFhriRy8sKjbu35K0edUzIzL6YCG6EENGsZs7GGyOqYTkg XgHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780395406; x=1781000206; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zlqWTxvd2nybMb9oOkq3B+WZ2+KSO9DV36s9D60SrZ0=; b=m5VL+uedGYYpW3sHQtQLAZvfW0O9udPeDt0ouynTDwSTPhPzZI0Thz7rxTQov/xB7Q BwyJj5lqA2y8aVGNf/eFnqwxu4KtwNHWJ8QC66QD2nB1SqLNROBU9uClqZ/RIUJ/ntPK GfbXNPcA6bfccqxS7UpA10SKKnwTXifz1mGl3kmEgr9EsRpEPDJ4Y2MbiT9qR7CZxrlY 1dd5d7gElyuTU+hA/F+O98A0KlZ6Ce/PXO2pauVKeZhnEN69vqBRRbybWNEDlwIKOlWr l1xE3xd0grF9UkpwWU4a6V2uc5sgm2lYwjLkp37ZHkUMs0La2y8Yl5kd6gZtmBJXDr1s H9FQ== X-Forwarded-Encrypted: i=1; AFNElJ/FYoeieb12iJ+nnzocs5PBa/K1YayxS0Vu++zIL2ouVDWOYKpAi/gqrKLATM9XVN2lSS7u2s2fxeCMO98few==@lists.infradead.org X-Gm-Message-State: AOJu0YwjbF7l/aNz/iUsAhUUCxMsM6N/Dw52Cx+VEr4hd7RrhvCd/Zuc UlmDv7N7XktJuQvrLvudIJ2SvgADrwJQa4+gd3UgvCVoxmlP6KPGGLkp X-Gm-Gg: Acq92OGWa+47QIyR+/QckET3gIzwJ02NPXKGTurVAQ0/eh3OFMFYV/W1WwaFLpTN/7q k76eFKSj70/5HM6RMH7Ig/cwGmefozsQAaIpZQ8xLdXbGICoi5TU66veuitr74XdnLvIJ+aPsyA yW4gECYFSjAOrYj7WUgiY5pKR5SrqSKlbUZDoFfay/NTCXXXnipZrSHjk+Nic1WACqsLfGabgfY M+4CroHj1QjPNFy9jRJKD6T9g5W8IxVe22fbLJEbwhq7peBiD1ZbPzglOeKq55uFGwYvX/L4zM9 l3a7yFcEUv7MaBpRLhY3XUeB5XV83p0rm2U0D3wsN07EWii9j73QWEU2b7wUq4NWPtGMGqjGjLb BhXX31mXBJSBeWXiJITtN4XS0pSdrUiJa74xiY+qSZ3U7NPXK7Rq/IOQQ2/DhRT4WPxgXkFACFH aGAHvMgSRlpLlOzWDpiYiimXL83iKHkgxG7WtDQ7l7a8PuXQxLlXC2kwy5x9aToL88jVBN X-Received: by 2002:a17:903:1983:b0:2bf:23cf:3e4 with SMTP id d9443c01a7336-2bf367d9da0mr164110925ad.17.1780395406357; Tue, 02 Jun 2026 03:16:46 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bf239fd84fsm132766305ad.23.2026.06.02.03.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 03:16:45 -0700 (PDT) From: phucduc.bui@gmail.com To: Heiko Stuebner , Mark Brown , Liam Girdwood , Krzysztof Kozlowski Cc: Rob Herring , Conor Dooley , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-sound@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH v2 2/5] ASoC: rockchip: spdif: Reorder clock enable sequence Date: Tue, 2 Jun 2026 17:16:05 +0700 Message-ID: <20260602101608.45137-3-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260602101608.45137-1-phucduc.bui@gmail.com> References: <20260602101608.45137-1-phucduc.bui@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260602_031647_349359_02D2AEE1 X-CRM114-Status: GOOD ( 13.23 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: bui duc phuc Enable the 'hclk' bus clock before the 'mclk' controller clock during runtime resume. The bus clock provides the register access interface, so enable it before the controller clock. This also makes the resume sequence the reverse of the suspend sequence, which keeps the clock ordering consistent. Signed-off-by: bui duc phuc --- NOTE: This patch is compile-tested only. Please help test if you have the relevant Rockchip hardware. Changes in v2: - Clarify in the commit message that the resume sequence becomes the reverse of the suspend sequence. sound/soc/rockchip/rockchip_spdif.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index 581624f2682e..8de5b76cfe79 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c @@ -76,16 +76,16 @@ static int rk_spdif_runtime_resume(struct device *dev) struct rk_spdif_dev *spdif = dev_get_drvdata(dev); int ret; - ret = clk_prepare_enable(spdif->mclk); + ret = clk_prepare_enable(spdif->hclk); if (ret) { - dev_err(spdif->dev, "mclk clock enable failed %d\n", ret); + dev_err(spdif->dev, "hclk clock enable failed %d\n", ret); return ret; } - ret = clk_prepare_enable(spdif->hclk); + ret = clk_prepare_enable(spdif->mclk); if (ret) { - clk_disable_unprepare(spdif->mclk); - dev_err(spdif->dev, "hclk clock enable failed %d\n", ret); + clk_disable_unprepare(spdif->hclk); + dev_err(spdif->dev, "mclk clock enable failed %d\n", ret); return ret; } -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B7D33D968D for ; Tue, 2 Jun 2026 10:16:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780395409; cv=none; b=j+88rZaYI7ymSORG+akIKKCVqhKZ5uFSETyc9aJ4hXhG2Pra9F1h0tpEhGXcqs8fm7PkEbGgIDoAmOVxn1j/UwcQveQBkRRIRq17NWG0bAmCUDVe8algsNjrRoTPOkosaQMPwsQ4e6/dyLnngbZA2U0NvBhUu8A75NEW0+jLXWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780395409; c=relaxed/simple; bh=jLLJS63DmaW6/N5p/t3mdPzRbOoNEcIP/BNYCgIzYbM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C3AH6Nb/Iz7a/26Qm6lw+MjV9al3jSV2FHElYzM26p3LkSqLaRXXipo742LoZzfjguS1oJyWMGwdYcAFXSZ8aILmNz/dwINJbT+FXrnKcz+K08mZCx2kvIAHeLTL6Zlex5nCG+wTxyZXOEmZ3eZstMZMPAxHK/IvlIh8Fa2yINI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OCO5KFgs; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OCO5KFgs" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2bf20f6be6bso23755305ad.3 for ; Tue, 02 Jun 2026 03:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780395406; x=1781000206; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zlqWTxvd2nybMb9oOkq3B+WZ2+KSO9DV36s9D60SrZ0=; b=OCO5KFgsWDtTd/4CHl4JEMzWtt5h8mWhi9Bz2OnEzsi12PddUsNjjLjTunolulKAdS pqGxgoglTPnQeTap04YEXV+0Rvzg6pWiCk9NdMCUnjLDOEiagk2wGf1h8EWiv4X56fF2 fzId7wy5xMBmr3AV6Tg5DUF1CZiiIc8qXzXoB6qPbsiqy4h3o90s3eLx8EzGFXV0XlOE GI+DO+UUGAUT9AM5fXlmnN3PFAFAAO9RjZLgNLZ6raysWQeirKAz9mcCou2/Gk0O7y+T Lh2EZ/E+s9WXrLSjYBH4GBjHB14c6oyhodWgqaUvVjnTEg+XG6zyONL9GkBZwcYc8cIn SrJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780395406; x=1781000206; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zlqWTxvd2nybMb9oOkq3B+WZ2+KSO9DV36s9D60SrZ0=; b=LasLZ4SHtCsNauWIlVfaDZzVRvia5hWWoI7Dlv2Eq3pwV9wUjNeUEbJ042+wlsBBOx bFtYhLbzFa85xDd9D269Jx8oxmalM9v9etakzlap8yrS4P6r23iZPqkj/PTNyJ2M3A7a qja/rGjt4JyFDBwOMB+1Yu+h6/dvDn0BG91Gu5lKQetFb+uqGTFvtf0a1tE4Dv7Ydrdp I+8i9OQyr7+rkOBc8LNXOV5vWhewNVoPecfXgZm3nphd4thf6dk2U6a62FXp0d4ivykc v4eSo12oMMvJa6Nd/UZQBgYajYJd8NllWD3Kk/fOWvakI4TpLuTXtJIddz5v9waEct/Y twUQ== X-Forwarded-Encrypted: i=1; AFNElJ9WVL2x4nZKM1HJ0kjoqsyOvEVme+BoMVMi+UX0TQG/iBopCLvV6mhJvngJ0kYgOXxpqwwcMm57Zm+b@vger.kernel.org X-Gm-Message-State: AOJu0YxEeoFP0KdyI5REYy0f4TQBMgbx1sOTEdwmjPlt1G/vugCjyiKV 9YCZAUIg7/Ha7axMVf7B5lkCo6SJdTuAlItpK438xExPMhcSyQbXTFro X-Gm-Gg: Acq92OE9UN2E8ZYlch5A3w6u77t0zNlJId9P8Uu5T9tQ3DTbMcUD+uBjG3GlW88el4F VJFXHnOdj5t/ALNCtPIotRhBkkknb0OoU8bOgVIf3IDe1zXNvLfVbenuKwnBidta+CaJBQp1NVH +6/aepG7h9i0jWxujIQU6JgOG5NPM+OJatxHSichSJ8gV9fCtfOawFVl1llrn6o3g/Whxcg2aWD TtAv1TZbr6mXSNc/SkKIZ0bRQ0fI+PdirSp0J9NYkwdgU+HK5MvBoObfux9Lx9HXo4UBqlP1Ndp 7zQkxd1SBqc4lS7KrGSa4ylCvLI9xBb6uS9ccOkdU592SEZnsJ5MdEuqyUgEiipigBK+Lv/FC8E MfxDaP9faKBuaQD0qdRMeXj+124OGWZdsPjrMxaYELuNT+3S9sebq/PhedhvQZ2b9F3M9zIwInI /X5SW/SjSd1vhHLp+gLK5nmL6NIYRBjLcYdrN6yNy0XImej6AD6EWsLJAVo5sL3C+apVIt X-Received: by 2002:a17:903:1983:b0:2bf:23cf:3e4 with SMTP id d9443c01a7336-2bf367d9da0mr164110925ad.17.1780395406357; Tue, 02 Jun 2026 03:16:46 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bf239fd84fsm132766305ad.23.2026.06.02.03.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2026 03:16:45 -0700 (PDT) From: phucduc.bui@gmail.com To: Heiko Stuebner , Mark Brown , Liam Girdwood , Krzysztof Kozlowski Cc: Rob Herring , Conor Dooley , Jaroslav Kysela , Takashi Iwai , devicetree@vger.kernel.org, linux-sound@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH v2 2/5] ASoC: rockchip: spdif: Reorder clock enable sequence Date: Tue, 2 Jun 2026 17:16:05 +0700 Message-ID: <20260602101608.45137-3-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260602101608.45137-1-phucduc.bui@gmail.com> References: <20260602101608.45137-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc Enable the 'hclk' bus clock before the 'mclk' controller clock during runtime resume. The bus clock provides the register access interface, so enable it before the controller clock. This also makes the resume sequence the reverse of the suspend sequence, which keeps the clock ordering consistent. Signed-off-by: bui duc phuc --- NOTE: This patch is compile-tested only. Please help test if you have the relevant Rockchip hardware. Changes in v2: - Clarify in the commit message that the resume sequence becomes the reverse of the suspend sequence. sound/soc/rockchip/rockchip_spdif.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index 581624f2682e..8de5b76cfe79 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c @@ -76,16 +76,16 @@ static int rk_spdif_runtime_resume(struct device *dev) struct rk_spdif_dev *spdif = dev_get_drvdata(dev); int ret; - ret = clk_prepare_enable(spdif->mclk); + ret = clk_prepare_enable(spdif->hclk); if (ret) { - dev_err(spdif->dev, "mclk clock enable failed %d\n", ret); + dev_err(spdif->dev, "hclk clock enable failed %d\n", ret); return ret; } - ret = clk_prepare_enable(spdif->hclk); + ret = clk_prepare_enable(spdif->mclk); if (ret) { - clk_disable_unprepare(spdif->mclk); - dev_err(spdif->dev, "hclk clock enable failed %d\n", ret); + clk_disable_unprepare(spdif->hclk); + dev_err(spdif->dev, "mclk clock enable failed %d\n", ret); return ret; } -- 2.43.0