Skip to content

Commit 7ef3538

Browse files
kmaincentkuba-moo
authored andcommitted
net: pse-pd: pd692x0: Skip power budget configuration when undefined
If the power supply's power budget is not defined in the device tree, the current code still requests power and configures the PSE manager with a 0W power limit, which is undesirable behavior. Skip power budget configuration entirely when the budget is zero, avoiding unnecessary power requests and preventing invalid 0W limits from being set on the PSE manager. Fixes: 3597540 ("net: pse-pd: pd692x0: Add support for PSE PI priority feature") Signed-off-by: Kory Maincent <[email protected]> Acked-by: Oleksij Rempel <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1c67f9c commit 7ef3538

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/pse-pd/pd692x0.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,10 @@ pd692x0_configure_managers(struct pd692x0_priv *priv, int nmanagers)
10411041
int pw_budget;
10421042

10431043
pw_budget = regulator_get_unclaimed_power_budget(supply);
1044+
if (!pw_budget)
1045+
/* Do nothing if no power budget */
1046+
continue;
1047+
10441048
/* Max power budget per manager */
10451049
if (pw_budget > 6000000)
10461050
pw_budget = 6000000;

0 commit comments

Comments
 (0)