power: supply: core: add wakeup source inhibit by power_supply_config
To inhibit wakeup users currently have to use dedicated functions to
register the power supply: {,devm_}power_supply_register_no_ws().
This is inconsistent to other runtime settings which can be configured
through struct power_supply_config.
It's also not obvious what _no_ws() is meant to mean.
Extend power_supply_config to also be able to inhibit the wakeup source.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-1-1d62bf9bcb1d@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
committed by
Sebastian Reichel
parent
b5289ba57a
commit
49000fee9e
@@ -1410,6 +1410,9 @@ __power_supply_register(struct device *parent,
|
||||
if (rc)
|
||||
goto device_add_failed;
|
||||
|
||||
if (cfg && cfg->no_wakeup_source)
|
||||
ws = false;
|
||||
|
||||
rc = device_init_wakeup(dev, ws);
|
||||
if (rc)
|
||||
goto wakeup_init_failed;
|
||||
|
||||
Reference in New Issue
Block a user