linux/drivers/power/supply
Michael Trimarchi 633e8799dd power: supply: pda_power: move from timer to delayed_work
This changed is needed to avoid locking problem during
boot as shown:

<5>[    8.824096] Registering SWP/SWPB emulation handler
<6>[    8.977294] clock: disabling unused clocks to save power
<3>[    9.108154] BUG: sleeping function called from invalid context at kernel_albert/kernel/mutex.c:269
<3>[    9.122894] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
<4>[    9.130249] 3 locks held by swapper/0/1:
<4>[    9.134613]  #0:  (&__lockdep_no_validate__){......}, at: [<c0342430>] __driver_attach+0x58/0xa8
<4>[    9.144500]  #1:  (&__lockdep_no_validate__){......}, at: [<c0342440>] __driver_attach+0x68/0xa8
<4>[    9.154357]  #2:  (&polling_timer){......}, at: [<c0053770>] run_timer_softirq+0x108/0x3ec
<4>[    9.163726] Backtrace:
<4>[    9.166473] [<c001269c>] (dump_backtrace+0x0/0x114) from [<c067e5f0>] (dump_stack+0x20/0x24)
<4>[    9.175811]  r6:00203230 r5:0000010d r4:d782e000 r3:60000113
<4>[    9.182250] [<c067e5d0>] (dump_stack+0x0/0x24) from [<c007441c>] (__might_sleep+0x10c/0x128)
<4>[    9.191650] [<c0074310>] (__might_sleep+0x0/0x128) from [<c0688f60>] (mutex_lock_nested+0x34/0x36c)
<4>[    9.201660]  r5:c02d5350 r4:d79a0c64
<4>[    9.205688] [<c0688f2c>] (mutex_lock_nested+0x0/0x36c) from [<c02d5350>] (regulator_set_current_limit+0x30/0x118)
<4>[    9.217071] [<c02d5320>] (regulator_set_current_limit+0x0/0x118) from [<c0435ce0>] (update_charger+0x84/0xc4)
<4>[    9.228027]  r7:d782fb20 r6:00000101 r5:c1767e94 r4:00000000
<4>[    9.234436] [<c0435c5c>] (update_charger+0x0/0xc4) from [<c0435d40>] (psy_changed+0x20/0x48)
<4>[    9.243804]  r5:d782e000 r4:c1767e94
<4>[    9.247802] [<c0435d20>] (psy_changed+0x0/0x48) from [<c0435dec>] (polling_timer_func+0x84/0xb8)
<4>[    9.257537]  r4:c1767e94 r3:00000002
<4>[    9.261566] [<c0435d68>] (polling_timer_func+0x0/0xb8) from [<c00537e4>] (run_timer_softirq+0x17c/0x3ec)
<4>[    9.272033]  r4:c1767eb0 r3:00000000
<4>[    9.276062] [<c0053668>] (run_timer_softirq+0x0/0x3ec) from [<c004b000>] (__do_softirq+0xf0/0x298)
<4>[    9.286010] [<c004af10>] (__do_softirq+0x0/0x298) from [<c004b650>] (irq_exit+0x98/0xa0)
<4>[    9.295013] [<c004b5b8>] (irq_exit+0x0/0xa0) from [<c000edbc>] (handle_IRQ+0x60/0xc0)
<4>[    9.303680]  r4:c1194e98 r3:c00bc778
<4>[    9.307708] [<c000ed5c>] (handle_IRQ+0x0/0xc0) from [<c0008504>] (gic_handle_irq+0x34/0x68)
<4>[    9.316955]  r8:000ac383 r7:d782fc3c r6:d782fc08 r5:c11936c4 r4:e0802100
<4>[    9.324310] r3:c026ba48
<4>[    9.327301] [<c00084d0>] (gic_handle_irq+0x0/0x68) from [<c068c2c0>] (__irq_svc+0x40/0x74)
<4>[    9.336456] Exception stack(0xd782fc08 to 0xd782fc50)
<4>[    9.342041] fc00:                   d6e30e6c ac383627 00000000 ac383417 ea19c000 ea200000
<4>[    9.351104] fc20: beffffff 00000667 000ac383 d6e30670 d6e3066c d782fc94 d782fbe8 d782fc50
<4>[    9.360168] fc40: c026ba48 c001d1f0 00000113 ffffffff

Fixes: b2998049cf ("[BATTERY] pda_power platform driver")
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Anthony Brandon <anthony@amarulasolutions.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-05-01 12:41:58 +02:00
..
88pm860x_battery.c
88pm860x_charger.c
ab8500_bmdata.c power: supply: ab8500: Replaced spaces with tabs in indent 2017-04-14 01:41:34 +02:00
ab8500_btemp.c power: supply: ab8500_btemp: Compress return logic into one line. 2017-01-17 00:28:38 +01:00
ab8500_charger.c power: supply: ab8500_charger: spelling: "prechage" -> "precharge" 2017-05-01 12:37:01 +02:00
ab8500_fg.c power: supply: improve function-level documentation 2016-10-19 05:06:22 +02:00
abx500_chargalg.c
act8945a_charger.c power: supply: act8945a_charger: Add max current property 2016-09-01 13:55:55 +02:00
apm_power.c
axp20x_ac_power.c power: supply: add AC power supply driver for AXP20X and AXP22X PMICs 2017-01-29 23:15:18 +01:00
axp20x_battery.c power: supply: add battery driver for AXP20X and AXP22X PMICs 2017-05-01 11:52:23 +02:00
axp20x_usb_power.c power: supply: axp20x_usb_power: use IIO channels when available 2017-01-29 23:15:17 +01:00
axp288_charger.c power: supply: axp288_charger: Use one notifier_block per extcon cable 2017-01-04 22:03:20 +01:00
axp288_fuel_gauge.c power: supply: axp288_fuel_gauge: Remove unnecessary irq?_en register writes 2017-01-04 22:03:44 +01:00
bq27xxx_battery_i2c.c power: supply: bq27xxx: adds specific support for bq27520-g4 revision. 2017-01-12 02:30:13 +01:00
bq27xxx_battery.c power: supply: bq27xxx: adds specific support for bq27520-g4 revision. 2017-01-12 02:30:13 +01:00
bq2415x_charger.c power: supply: bq2415x: check for NULL acpi_id to avoid null pointer dereference 2017-01-21 03:35:07 +01:00
bq24190_charger.c power: supply: bq24190_charger: Deprecate battery class and replicate its features in charger 2017-05-01 11:52:15 +02:00
bq24257_charger.c power: bq24257: Fix use of uninitialized pointer bq->charger 2016-09-19 20:56:22 +02:00
bq24735-charger.c power: supply: bq24735: bring down the noise level 2017-01-04 22:03:33 +01:00
bq25890_charger.c power: supply: bq25890: Use gpiod_get() 2017-04-14 01:41:34 +02:00
charger-manager.c power: supply: charger-manager: simplify return statements 2017-04-14 01:41:34 +02:00
collie_battery.c
cpcap-charger.c power: supply: cpcap-charger: Add minimal CPCAP PMIC battery charger 2017-04-14 01:41:34 +02:00
da9030_battery.c
da9052-battery.c
da9150-charger.c
da9150-fg.c
ds2760_battery.c
ds2780_battery.c
ds2781_battery.c
ds2782_battery.c
generic-adc-battery.c power: supply: generic-adc-battery: use SIMPLE_DEV_PM_OPS helper macro 2017-05-01 11:52:24 +02:00
goldfish_battery.c
gpio-charger.c power: supply: gpio_charger: switch to using GPIO descriptors 2017-01-04 22:04:50 +01:00
ipaq_micro_battery.c power: ipaq_micro_battery: fix alias 2016-11-23 23:44:40 +01:00
isp1704_charger.c power: supply: isp1704: Fix unchecked return value of devm_kzalloc 2017-05-01 11:52:25 +02:00
jz4740-battery.c
Kconfig power: supply: axp20x_usb_power: add IIO dependency 2017-05-01 11:56:49 +02:00
lego_ev3_battery.c power: supply: New driver for LEGO MINDSTORMS EV3 battery 2017-04-14 01:41:35 +02:00
lp8727_charger.c
lp8788-charger.c power: supply: lp8788: prevent out of bounds array access 2017-04-14 01:41:34 +02:00
ltc2941-battery-gauge.c power: supply: ltc2941-battery-gauge: Add OF device ID table 2017-04-14 01:41:34 +02:00
Makefile power: supply: add battery driver for AXP20X and AXP22X PMICs 2017-05-01 11:52:23 +02:00
max8903_charger.c
max8925_power.c
max8997_charger.c power: supply: max8997_charger: Using device managed API and remove OOM print 2017-01-04 21:59:56 +01:00
max8998_charger.c
max14577_charger.c
max14656_charger_detector.c power: supply: max14656: Export I2C and OF device ID as module aliases 2017-01-29 23:15:17 +01:00
max17040_battery.c power: supply: max17040: Add OF device ID table 2017-04-14 01:41:33 +02:00
max17042_battery.c power: supply: max17042_battery: Add support for the SCOPE property 2017-05-01 12:37:58 +02:00
max77693_charger.c
olpc_battery.c
pcf50633-charger.c power: supply: pcf50633-charger: Compress return logic into one line. 2017-01-17 00:29:16 +01:00
pda_power.c power: supply: pda_power: move from timer to delayed_work 2017-05-01 12:41:58 +02:00
pm2301_charger.c
pm2301_charger.h
pmu_battery.c
power_supply_core.c power: supply: Make power_supply_am_i_supplied return -ENODEV if there are no suppliers 2017-05-01 11:51:20 +02:00
power_supply_leds.c
power_supply_sysfs.c
power_supply.h
qcom_smbb.c power: supply: qcom_smbb: Add otg regulator for control of vbus 2017-01-16 23:02:46 +01:00
rt5033_battery.c
rt9455_charger.c
rx51_battery.c
s3c_adc_battery.c
sbs-battery.c power: supply: sbs-battery: fix the sbs interrupt request 2017-05-01 11:52:24 +02:00
sbs-charger.c power: supply: sbs-charger: simplified bool function 2017-04-14 01:41:34 +02:00
smb347-charger.c
test_power.c
tosa_battery.c
tps65090-charger.c
tps65217_charger.c power: supply: tps65217: remove debug messages for function calls 2017-04-14 01:41:35 +02:00
twl4030_charger.c power: supply: twl4030-charger: don't check if battery is present 2017-05-01 11:41:37 +02:00
twl4030_madc_battery.c
wm97xx_battery.c power: supply: wm97xx_battery: remove redundant 2nd null check on pdata 2017-01-04 22:04:20 +01:00
wm831x_backup.c
wm831x_power.c
wm8350_power.c wm8350_power: use permission-specific DEVICE_ATTR variants 2016-11-23 23:46:20 +01:00
z2_battery.c