2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00
linux-next/drivers/power
Krzysztof Kozlowski bc1540561c power_supply: Add API for safe access of power supply function attrs
Add simple wrappers for accessing power supply's function attributes:
 - get_property -> power_supply_get_property
 - set_property -> power_supply_set_property
 - property_is_writeable -> power_supply_property_is_writeable
 - external_power_changed -> power_supply_external_power_changed

This API along with atomic usage counter adds a safe way of accessing a
power supply from another driver. If power supply is unregistered after
obtaining reference to it by some driver, then the API wrappers won't be
executed in invalid (freed) context.

Next patch changing the ownership of power supply class is still needed
to fully fix race conditions in accessing freed power supply.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-03-13 23:15:48 +01:00
..
avs PM / AVS: rockchip-io: add driver handling Rockchip io domains 2014-09-25 09:57:23 -07:00
reset power/reset: restart-poweroff: Remove arm dependencies 2015-01-25 22:13:18 +01:00
88pm860x_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
88pm860x_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ab8500_bmdata.c ab8500_bmdata: Export abx500_res_to_temp tables for hwmon 2013-04-16 17:38:10 -07:00
ab8500_btemp.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ab8500_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ab8500_fg.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
abx500_chargalg.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
apm_power.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
axp288_fuel_gauge.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
bq27x00_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
bq2415x_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
bq24190_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
bq24735-charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
charger-manager.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
collie_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
da9030_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
da9052-battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
da9150-charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ds2760_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ds2780_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ds2781_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ds2782_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
generic-adc-battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
goldfish_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
gpio-charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
intel_mid_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ipaq_micro_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
isp1704_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
jz4740-battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
Kconfig X-Power AXP288 PMIC Fuel Gauge Driver 2015-03-07 20:08:58 +01:00
lp8727_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
lp8788-charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
ltc2941-battery-gauge.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
Makefile X-Power AXP288 PMIC Fuel Gauge Driver 2015-03-07 20:08:58 +01:00
max8903_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
max8925_power.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
max8997_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
max8998_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
max14577_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
max17040_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
max17042_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
max77693_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
olpc_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
pcf50633-charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
pda_power.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
pm2301_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
pm2301_charger.h pm2301-charger: Removed unused code from PM2301 driver 2013-03-07 12:35:53 +08:00
pmu_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
power_supply_core.c power_supply: Add API for safe access of power supply function attrs 2015-03-13 23:15:48 +01:00
power_supply_leds.c power-supply: Avoid unnecessary 'goto' statements 2014-09-16 11:01:37 +02:00
power_supply_sysfs.c power-supply: Check for failures only when we can fail 2014-09-16 11:01:37 +02:00
power_supply.h device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
rt5033_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
rx51_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
s3c_adc_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
sbs-battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
smb347-charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
test_power.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
tosa_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
tps65090-charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
twl4030_charger.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
twl4030_madc_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
wm97xx_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
wm831x_backup.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
wm831x_power.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
wm8350_power.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00
z2_battery.c power_supply: Move run-time configuration to separate structure 2015-03-13 23:15:12 +01:00