linux/drivers/power/supply
Chen-Yu Tsai 97ec136e71 power: supply: axp20x_usb_power: use polling to detect vbus status change
On AXP221 and later AXP PMICs that have the N_VBUSEN pin, when this pin
is high, either due to the PMIC driving it high or as an input, the VBUS
detection related interrupt mechanisms are disabled.

Previously this was worked around in the phy-sun4i-usb driver, which
needed to sense VBUS changes and report them to the musb driver in a
timely matter. However this workaround was only for the A31 and A33 type
USB PHYs. To support newer platforms we would have to enable it for
almost all the post-A31 SoCs.

However, since this is actually the result of the PMIC's behavior, the
workaround would be better if done in the PMIC driver, in this case the
VBUS power supply driver.

Add the same workqueue-based polling to the VBUS power supply driver.
The polling interval is chosen to be the debounce interval from the USB
PHY driver, as this short interval is needed in some cases, but the
power supply driver would not know when.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
2019-04-17 23:23:15 +02:00
..
88pm860x_battery.c
88pm860x_charger.c
ab8500_bmdata.c power: supply: ab8500: fix leaked of_node refs in ab8500_bm_of_probe 2019-04-17 22:14:24 +02:00
ab8500_btemp.c power: supply: ab8500: Drop AB8540/9540 support 2018-04-25 23:49:44 +02:00
ab8500_charger.c power: supply: ab8500_charger: fix spelling mistake: "faile" -> "failed" 2018-05-01 13:31:38 +02:00
ab8500_fg.c power: supply: ab8500_fg: silence uninitialized variable warnings 2018-09-16 11:40:46 +02:00
abx500_chargalg.c power: supply: ab8500: Drop AB8540/9540 support 2018-04-25 23:49:44 +02:00
act8945a_charger.c power: supply: act8945a_charger: fix of_irq_get() error check 2017-07-24 14:09:00 +02:00
adp5061.c power: supply: adp5061: Fix a couple off by ones 2018-07-11 12:00:24 +02:00
apm_power.c
axp20x_ac_power.c power: supply: add AC power supply driver for AXP813 2018-12-05 18:49:32 +01:00
axp20x_battery.c power: supply: axp20x_battery: add support for AXP813 2018-03-09 16:52:33 +01:00
axp20x_usb_power.c power: supply: axp20x_usb_power: use polling to detect vbus status change 2019-04-17 23:23:15 +02:00
axp288_charger.c power: supply: axp288_charger: Fix unchecked return value 2019-04-05 16:03:44 +02:00
axp288_fuel_gauge.c power: supply: axp288_fuel_gauge: Change to use DEFINE_SHOW_ATTRIBUTE macro 2019-01-20 22:21:45 +01:00
bq27xxx_battery_hdq.c power: supply: bq27xxx: move platform driver code into bq27xxx_battery_hdq.c 2017-07-25 15:31:21 +02:00
bq27xxx_battery_i2c.c power: supply: bq27xxx: Add support for BQ27411 2018-09-20 11:35:40 +02:00
bq27xxx_battery.c bq27x00: use cached flags 2019-02-20 00:26:38 +01:00
bq2415x_charger.c power: supply: bq2415x: fix race-condition in sysfs registration 2018-12-13 00:15:21 +01:00
bq24190_charger.c power: supply: bq24190_charger: fix race-condition in sysfs registration 2018-12-13 00:16:08 +01:00
bq24257_charger.c power: supply: bq24257: fix race-condition in sysfs registration 2018-12-13 00:16:12 +01:00
bq24735-charger.c power: supply: bq24735: remove incorrect le16_to_cpu calls 2017-06-15 16:47:35 +02:00
bq25890_charger.c power: supply: bq25890: show max charge current/voltage as configured 2019-01-23 22:29:45 +01:00
charger-manager.c power: charger-manager: fix a potential NULL pointer dereference 2019-04-05 16:00:06 +02:00
collie_battery.c
cpcap-battery.c power: supply: cpcap-battery: Fix pointless EPROBE_DEFER warnings 2019-04-15 22:53:50 +02:00
cpcap-charger.c power: supply: cpcap-charger: Fix pointless EPROBE_DEFER warnings 2019-04-15 22:54:06 +02:00
cros_usbpd-charger.c Immutable branch for mfd and power-supply for v4.20 2018-09-16 13:10:37 +02:00
da9030_battery.c
da9052-battery.c
da9150-charger.c
da9150-fg.c power: supply: da9150-fg: remove VLA usage 2018-03-12 14:34:52 +01:00
ds2760_battery.c power: supply: ds2760_battery: add devicetree probing 2018-07-11 18:09:09 +02:00
ds2780_battery.c power: supply: ds2780: switch to devm_power_supply_register 2018-12-13 00:16:47 +01:00
ds2781_battery.c power: supply: ds2781: switch to devm_power_supply_register 2018-12-13 00:16:56 +01:00
ds2782_battery.c power: supply: ds2782: fix possible use-after-free on remove 2019-02-12 23:27:16 +01:00
generic-adc-battery.c power: generic-adc-battery: check for duplicate properties copied from iio channels 2018-07-06 18:58:44 +02:00
goldfish_battery.c drivers: power: supply: goldfish_battery: Add support for reading more properties 2019-01-21 22:31:27 +01:00
gpio-charger.c power: supply: gpio-charger: Add support for charger status. 2019-04-15 22:07:18 +02: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: switch to gpiod API 2019-01-20 21:57:43 +01:00
jz4740-battery.c
Kconfig power: supply: ltc3651-charger: Fix device name 2019-04-10 00:39:01 +02:00
lego_ev3_battery.c power: supply: lego_ev3_battery: fix Vce offset 2018-07-22 23:33:43 +02:00
lp8727_charger.c
lp8788-charger.c power: supply: lp8788: fix race-condition in sysfs registration 2018-12-13 00:16:02 +01:00
lt3651-charger.c power: supply: ltc3651-charger: Fix device name (rename files) 2019-04-10 00:39:01 +02:00
ltc2941-battery-gauge.c Merge branch 'fixes' into for-next 2018-03-12 14:35:10 +01:00
Makefile power: supply: ltc3651-charger: Fix device name (rename files) 2019-04-10 00:39:01 +02:00
max1721x_battery.c power: supply: max1721x: fix spelling mistake "RSenese" -> "RSense" 2018-06-28 14:24:13 +02:00
max8903_charger.c
max8925_power.c power: max8925: mark expected switch fall-through 2018-10-21 21:33:35 +02:00
max8997_charger.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
max8998_charger.c power: supply: max8998-charger: Fix platform data retrieval 2018-09-16 13:46:39 +02:00
max14577_charger.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
max14656_charger_detector.c power: supply: max14656: fix potential use-after-free 2019-04-05 18:01:38 +02:00
max17040_battery.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
max17042_battery.c max17042_battery: fix potential use-after-free on device remove 2019-02-20 00:36:52 +01:00
max77693_charger.c power: supply: maxim: Add SPDX license identifiers 2018-08-30 00:18:10 +02:00
olpc_battery.c power: supply: olpc_battery: correct the temperature units 2018-11-19 14:14:46 +01:00
pcf50633-charger.c power: supply: pcf50633: fix race-condition in sysfs registration 2018-12-13 00:16:24 +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: core: fix leaked of_node refs in power_supply_get_battery_info 2019-04-17 22:19:12 +02:00
power_supply_leds.c
power_supply_sysfs.c power: supply: sysfs: ratelimit property read error message 2018-09-16 11:29:18 +02:00
power_supply.h
qcom_smbb.c extcon: Split out extcon header file for consumer and provider device 2017-10-23 14:07:58 +09:00
rt5033_battery.c
rt9455_charger.c
rx51_battery.c power: supply: avoid unused twl4030-madc.h 2017-05-01 13:03:09 +02:00
s3c_adc_battery.c power: supply: s3c-adc-battery: fix driver data initialization 2018-04-26 00:12:11 +02:00
sbs-battery.c power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats 2018-06-28 14:09:46 +02:00
sbs-charger.c power: supply: sbs-charger: simplified bool function 2017-04-14 01:41:34 +02:00
sbs-manager.c power: supply: sbs-message: double left shift bug in sbsm_select() 2017-12-01 16:08:00 +01:00
sc27xx_fuel_gauge.c power: supply: sc27xx: Fix capacity saving function 2019-01-23 21:26:56 +01:00
sc2731_charger.c power: supply: sc2731_charger: Free battery information 2018-12-05 23:54:01 +01:00
smb347-charger.c
test_power.c
tosa_battery.c
tps65090-charger.c
tps65217_charger.c power: supply: tps65217: Switch to SPDX identifier. 2018-06-28 14:19:20 +02:00
twl4030_charger.c power: twl4030: fix a missing check of return value 2019-01-20 22:38:35 +01:00
twl4030_madc_battery.c power: supply: avoid unused twl4030-madc.h 2017-05-01 13:03:09 +02:00
wm97xx_battery.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
wm831x_backup.c
wm831x_power.c power: wm831x_power: Support USB charger current limit management 2017-08-15 15:05:01 +03:00
wm8350_power.c power: supply: mark expected switch fall-throughs 2018-07-23 00:10:47 +02:00
z2_battery.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00