From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFBE83BA8C2; Sat, 28 Feb 2026 17:39:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300345; cv=none; b=VL1VYrb+7+yG1sch1zUzTnFZiqOFV09lVLHx8jVq6a+OmEE3yvCSyiipaZkjyQl3LYmRUkdb/Fa8TcImPwhWClLXc21Hb1akttVx9QeGcqtG+tNM0vclfL0OvYxOwVoHaxBRv+0u3AUB/oUJjyeFPzCeTRqCuRSoe4L8skHXy34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300345; c=relaxed/simple; bh=kk2/UZdY4A+i9yZHtFFnvjm4Eqf8Gk9+iUrxy+RCzw8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M5PYH37xcnKU/WX2appsE+ESMg7t5m0vzGz7bBUvE4/bLovKEPXUSuYY0xYlsx6hULX6xZASSI/vp9D2blLYVFOzteC+BF3xG59VGGBP2qTP9DklJd4dXcvsYA3N6ddXJ73/QI4l3pp7mGGRZtiwkw4Uh+v2M1EFW6SiazQtuDE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U8vr3to9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U8vr3to9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4F0BC116D0; Sat, 28 Feb 2026 17:39:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300344; bh=kk2/UZdY4A+i9yZHtFFnvjm4Eqf8Gk9+iUrxy+RCzw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8vr3to925pE1BV3Mb/QN76jtlcxJobOZbJxKSeipBVoPQUttZY8chxg3AgrjoR+B tjjWk4LRQWgWKvFnnZTrHzR188c0v95ygXUa+FHHtf0tgim4C0H5sr8QS5rxgWMBOY lh4WacQBfOnSW1nAh2LvBmdkQ+GmCOCAVt5fF49Rl/owksqyqQMkkeJYGPLo9NN9+6 6+LAm+Jx4wvbJ9oh13oGZCoB4W0XMpGUQ7JKxMEUMrj5Pah7h0LIOf3iRsRu/0UGdl UCCDFfppIsKuReACjbb4jO8k9/Itxpm5tdhpbdo5m2e6YERKEvHMcJL3DvSssb4FnU QavVb6/aFM2WQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Thomas Richard (TI.com)" , Vinod Koul , Sasha Levin Subject: [PATCH 6.19 377/844] phy: ti: phy-j721e-wiz: restore mux selection during resume Date: Sat, 28 Feb 2026 12:24:50 -0500 Message-ID: <20260228173244.1509663-378-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: "Thomas Richard (TI.com)" [ Upstream commit 53f6240e88c9e8715e09fc19942f13450db4cb33 ] While suspend and resume mux selection was getting lost. So save and restore these values in suspend and resume operations. Signed-off-by: Thomas Richard (TI.com) Link: https://patch.msgid.link/20251216-phy-ti-phy-j721e-wiz-resume-restore-mux-sel-v1-1-771d564db966@bootlin.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/ti/phy-j721e-wiz.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index a8b440c6c46bb..ba31b0a1f7f79 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -393,6 +393,7 @@ struct wiz { struct clk *output_clks[WIZ_MAX_OUTPUT_CLOCKS]; struct clk_onecell_data clk_data; const struct wiz_data *data; + int mux_sel_status[WIZ_MUX_NUM_CLOCKS]; }; static int wiz_reset(struct wiz *wiz) @@ -1654,11 +1655,25 @@ static void wiz_remove(struct platform_device *pdev) pm_runtime_disable(dev); } +static int wiz_suspend_noirq(struct device *dev) +{ + struct wiz *wiz = dev_get_drvdata(dev); + int i; + + for (i = 0; i < WIZ_MUX_NUM_CLOCKS; i++) + regmap_field_read(wiz->mux_sel_field[i], &wiz->mux_sel_status[i]); + + return 0; +} + static int wiz_resume_noirq(struct device *dev) { struct device_node *node = dev->of_node; struct wiz *wiz = dev_get_drvdata(dev); - int ret; + int ret, i; + + for (i = 0; i < WIZ_MUX_NUM_CLOCKS; i++) + regmap_field_write(wiz->mux_sel_field[i], wiz->mux_sel_status[i]); /* Enable supplemental Control override if available */ if (wiz->sup_legacy_clk_override) @@ -1680,7 +1695,7 @@ static int wiz_resume_noirq(struct device *dev) return ret; } -static DEFINE_NOIRQ_DEV_PM_OPS(wiz_pm_ops, NULL, wiz_resume_noirq); +static DEFINE_NOIRQ_DEV_PM_OPS(wiz_pm_ops, wiz_suspend_noirq, wiz_resume_noirq); static struct platform_driver wiz_driver = { .probe = wiz_probe, -- 2.51.0