regulator: core: Use the power efficient workqueue for delayed powerdown
Mark Brown
maintainerPATCH 1/1 regulator: core: Use the power efficient workqueue for delayed powerdown
From: Mark Brown <[email protected]>
There is no need to use a normal per-CPU workqueue for delayed power downs as they're not timing or performance critical and waking up a core for them would defeat some of the point.
--- drivers/regulator/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/regulator/core.c +3 -2
@@ -1891,8 +1891,9 @@ int regulator_disable_deferred(struct regulator *regulator, int ms) rdev->deferred_disables++;mutex_unlock (&rdev->mutex); - ret =schedule_delayed_work (&rdev->disable_work, -msecs_to_jiffies (ms)); + ret =queue_delayed_work (system_power_efficient_wq, + &rdev->disable_work, +msecs_to_jiffies (ms));if (ret <0 )return ret;else
Signature · 1 line
1.8.3.2
Quoted 17 lines · Mark Brown
From: Mark Brown <[email protected]>
There is no need to use a normal per-CPU workqueue for delayed power downs as they're not timing or performance critical and waking up a core for them would defeat some of the point.
Signed-off-by Mark Brown <[email protected]>--- drivers/regulator/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/regulator/core.c +0
-0@@ -1891,8 +1891,9 @@ int regulator_disable_deferred(struct regulator *regulator, int ms) rdev->deferred_disables++;
drivers/regulator/core.c int regulator_disable_deferred(struct regulator *regulator, int ms) · line 1899
Quoted 10 lines
drivers/regulator/core.c +3
-2mutex_unlock (&rdev->mutex); - ret =schedule_delayed_work (&rdev->disable_work, -msecs_to_jiffies (ms)); + ret =queue_delayed_work (system_power_efficient_wq, + &rdev->disable_work, +msecs_to_jiffies (ms));if (ret <0 )return ret;else
Cool!! People have started to use this interface now :)
Mark Brown
maintainerQuoted 1 line · Viresh Kumar
Cool!! People have started to use this interface now :)
It could do with a bit more publicity - the only reason I heard of it is that I queried what a version of it was doing in the middle of big.LITTLE patches for the LSK and why it wasn't upstream.