From nobody Thu Dec 18 23:25:20 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 F2F8233D518 for ; Tue, 16 Dec 2025 14:26:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765895206; cv=none; b=s8QqIGJPUtEJyt3xG7PGJ1/JG/LVq6Ijq9KqXYCBroHAcf8QuTo9zYJ2v5TFsACTYwrAjTMtJMsU/Q+KEy/+S3Hb10m7sXPTmoVZaztl2rkwZhmhqUu3CItF6IsDmYT0YpU4GP9+A6fWXEspL72jj0KqhFsiEdPI6rVkWJiP73A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765895206; c=relaxed/simple; bh=u6e/nUpz6PfZOKB4Rg+Ouj31sMXyzm9REqLLda3bRWQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=jI6wgpPN/QlH0ijJsD9yWKl/gaXaSCGh6Y5XPaIGuPYrvKM69u4NjFvOTAgFNM/3n2RfKImLb98rE+A3fY2dHXdZw1ZjVqrwUJ0tauJ1+xdBd/7kCktFO5J1waojELonCutsywXlusaiYDYtiySpE+5+czrgYFhKlXriUvnq0r0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=LetOZ3G1; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="LetOZ3G1" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 7152FC19D3C for ; Tue, 16 Dec 2025 14:26:17 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E03BB6073D; Tue, 16 Dec 2025 14:26:41 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6FD2411943695; Tue, 16 Dec 2025 15:26:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765895196; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=aXdArrEv7P8qjQLi/yEInj1C2PVSeCo3HZ1LFRj2r+Y=; b=LetOZ3G14EaVuRrJOg5xAJRTbpwszkYAbOf0CrqYdS1fYYpn+xNf4LuuN3ZXz8SdgqOnBW VZvOZpQx8XHzGJ0eiUQ+If/JI8PfKgjj0FY6Poz1hVnhyKZAIclC2QH7jWcyA1nkokXA/Q mX+gmyPS3B0gn8xRP2RtxUtudPFiLPMWL6JoMaDEFpMNzyPC8cQGwU6v/dP8QomSXfBC0s dThlzeQ6/2U7fIHXetfBqSqL3QbMoZ6V0M353bxhKU+JPYO85VTBS5bQ7HXrDU82AfamQ+ eVIpjCDUHweKl4HbVKLxIEKZKrb136MX1USTYHns5EaKCgYXpltyQou+HwCcdw== From: "Thomas Richard (TI.com)" Date: Tue, 16 Dec 2025 15:26:20 +0100 Subject: [PATCH RESEND] phy: ti: phy-j721e-wiz: restore mux selection during resume Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251216-phy-ti-phy-j721e-wiz-resume-restore-mux-sel-v1-1-771d564db966@bootlin.com> To: Vinod Koul , Kishon Vijay Abraham I Cc: Thomas Petazzoni , Gregory CLEMENT , Udit Kumar , Prasanth Mantena , Abhash Kumar , linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, "Thomas Richard (TI.com)" X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 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) --- 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 a8b440c6c46b..ba31b0a1f7f7 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]; }; =20 static int wiz_reset(struct wiz *wiz) @@ -1654,11 +1655,25 @@ static void wiz_remove(struct platform_device *pdev) pm_runtime_disable(dev); } =20 +static int wiz_suspend_noirq(struct device *dev) +{ + struct wiz *wiz =3D dev_get_drvdata(dev); + int i; + + for (i =3D 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 =3D dev->of_node; struct wiz *wiz =3D dev_get_drvdata(dev); - int ret; + int ret, i; + + for (i =3D 0; i < WIZ_MUX_NUM_CLOCKS; i++) + regmap_field_write(wiz->mux_sel_field[i], wiz->mux_sel_status[i]); =20 /* 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; } =20 -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_n= oirq); =20 static struct platform_driver wiz_driver =3D { .probe =3D wiz_probe, --- base-commit: a22c168bc6e1295fd878c87684a84db9e79c574f change-id: 20251110-phy-ti-phy-j721e-wiz-resume-restore-mux-sel-453f03abce4d Best regards, --=20 Thomas Richard (TI.com)