Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH v2] clk: qcom: negcc-nord: Register set_hwmode_dev callback for USB GDSCs
@ 2026-12-04 19:07 Krishna Kurapati
  2026-12-04 19:22 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Krishna Kurapati @ 2026-12-04 19:07 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet
  Cc: linux-arm-msm, linux-clk, linux-kernel, Krishna Kurapati

Register gdsc_set_hw_stay_on as set_hwmode_dev callback for USB GDSCs to
allow the USB consumer drivers to keep the GDSC ON based on the
requirement in USB host mode.

Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
---
Following up on [1], this patch has been tested on nord ride platform.

[1]: https://lore.kernel.org/all/20261127-usb-pcie-gdsc-suspend-v1-0-485a08ffdc6f@oss.qualcomm.com/
---
Changes in v2:
- Fixed commit header : shikra -> negcc-nord
- Link to v1: https://patch.msgid.link/20261204-nord-usb-gdscs-v1-1-254a035965fe@oss.qualcomm.com
---
 drivers/clk/qcom/negcc-nord.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/clk/qcom/negcc-nord.c b/drivers/clk/qcom/negcc-nord.c
index 68ce4d6278ba..8f6a8cc8edc7 100644
--- a/drivers/clk/qcom/negcc-nord.c
+++ b/drivers/clk/qcom/negcc-nord.c
@@ -1706,6 +1706,7 @@ static struct gdsc ne_gcc_usb20_prim_gdsc = {
 	.clk_dis_wait_val = 0xf,
 	.pd = {
 		.name = "ne_gcc_usb20_prim_gdsc",
+		.set_hwmode_dev = gdsc_set_hw_stay_on,
 	},
 	.pwrsts = PWRSTS_OFF_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -1718,6 +1719,7 @@ static struct gdsc ne_gcc_usb31_prim_gdsc = {
 	.clk_dis_wait_val = 0xf,
 	.pd = {
 		.name = "ne_gcc_usb31_prim_gdsc",
+		.set_hwmode_dev = gdsc_set_hw_stay_on,
 	},
 	.pwrsts = PWRSTS_OFF_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -1730,6 +1732,7 @@ static struct gdsc ne_gcc_usb31_sec_gdsc = {
 	.clk_dis_wait_val = 0xf,
 	.pd = {
 		.name = "ne_gcc_usb31_sec_gdsc",
+		.set_hwmode_dev = gdsc_set_hw_stay_on,
 	},
 	.pwrsts = PWRSTS_OFF_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -1742,6 +1745,7 @@ static struct gdsc ne_gcc_usb3_phy_gdsc = {
 	.clk_dis_wait_val = 0x2,
 	.pd = {
 		.name = "ne_gcc_usb3_phy_gdsc",
+		.set_hwmode_dev = gdsc_set_hw_stay_on,
 	},
 	.pwrsts = PWRSTS_OFF_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
@@ -1754,6 +1758,7 @@ static struct gdsc ne_gcc_usb3_sec_phy_gdsc = {
 	.clk_dis_wait_val = 0x2,
 	.pd = {
 		.name = "ne_gcc_usb3_sec_phy_gdsc",
+		.set_hwmode_dev = gdsc_set_hw_stay_on,
 	},
 	.pwrsts = PWRSTS_OFF_ON,
 	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,

---
base-commit: 3010f4b0fcca1d50f850ac6524275435d5af3502
change-id: 20261204-nord-usb-gdscs-de8fa4cbc070
prerequisite-change-id: 20261126-usb-pcie-gdsc-suspend-7a99c6b62406

Best regards,
--  
Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] clk: qcom: negcc-nord: Register set_hwmode_dev callback for USB GDSCs
  2026-12-04 19:07 [PATCH v2] clk: qcom: negcc-nord: Register set_hwmode_dev callback for USB GDSCs Krishna Kurapati
@ 2026-12-04 19:22 ` sashiko-bot
  0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-12-04 19:22 UTC (permalink / raw)
  To: Krishna Kurapati; +Cc: linux-clk

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] clk: qcom: negcc-nord build fails on undeclared
  gdsc_set_hw_stay_on
--

commit 8b0e5b62a8bff4c0548c4f7bb1c32c4724fbe988
Author: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>

clk: qcom: negcc-nord: Register set_hwmode_dev callback for USB GDSCs

This commit registers gdsc_set_hw_stay_on as the set_hwmode_dev callback
for the five USB GDSCs in the Nord NEGCC driver.

> diff --git a/drivers/clk/qcom/negcc-nord.c b/drivers/clk/qcom/negcc-nord.c
> index 68ce4d6278baa..8f6a8cc8edc71 100644
> --- a/drivers/clk/qcom/negcc-nord.c
> +++ b/drivers/clk/qcom/negcc-nord.c
> @@ -1706,6 +1706,7 @@ static struct gdsc ne_gcc_usb20_prim_gdsc = {
>  	.clk_dis_wait_val = 0xf,
>  	.pd = {
>  		.name = "ne_gcc_usb20_prim_gdsc",
> +		.set_hwmode_dev = gdsc_set_hw_stay_on,
>  	},
>  	.pwrsts = PWRSTS_OFF_ON,
>  	.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,

[Severity: High]
Does this break compilation of drivers/clk/qcom/negcc-nord.c?

gdsc_set_hw_stay_on is neither declared in drivers/clk/qcom/gdsc.h nor
defined anywhere in the tree, so assigning it to all five USB GDSCs here
fails the build whenever CONFIG_CLK_NORD_GCC is enabled (the default on
ARCH_QCOM and under COMPILE_TEST).

The prerequisite series referenced in the patch notes that introduces
gdsc_set_hw_stay_on does not appear to be in the base tree yet.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-nord-usb-gdscs-v2-1-a7902fa88247@oss.qualcomm.com?part=1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-12-04 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 19:07 [PATCH v2] clk: qcom: negcc-nord: Register set_hwmode_dev callback for USB GDSCs Krishna Kurapati
2026-12-04 19:22 ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox