Unverified Commit 3ebed2fd authored by Armin Wolf's avatar Armin Wolf Committed by Ilpo Järvinen
Browse files

power: supply: core: Add power_supply_get/set_property_direct()



Power supply extensions might want to interact with the underlying
power supply to retrieve data like serial numbers, charging status
and more. However doing so causes psy->extensions_sem to be locked
twice, possibly causing a deadlock.

Provide special variants of power_supply_get/set_property() that
ignore any power supply extensions and thus do not touch the
associated psy->extensions_sem lock.

Suggested-by: default avatarHans de Goede <hansg@kernel.org>
Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
Acked-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarHans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250627205124.250433-1-W_Armin@gmx.de


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 8346c6af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment