summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2018-12-27 22:52:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-23 22:11:35 +0300
commit6eea03f8c368b79f8b8ca0fbe4cbe23ce51cb843 (patch)
treefb8b375a7a9ef1127d97abf2bbc1116ea684db39
parent9cc42d068f57ed5bf15ec626f20d256cfffc5d1c (diff)
downloadlinux-6eea03f8c368b79f8b8ca0fbe4cbe23ce51cb843.tar.xz
cpcap-charger: generate events for userspace
commit fd10606f93a149a9f3d37574e5385b083b4a7b32 upstream. The driver doesn't generate uevents on charger connect/disconnect. This leads to UPower not detecting when AC is on or off... and that is bad. Reported by Arthur D. on github ( https://github.com/maemo-leste/bugtracker/issues/206 ), thanks to Merlijn Wajer for suggesting a fix. Cc: stable@kernel.org Signed-off-by: Pavel Machek <pavel@ucw.cz> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/power/supply/cpcap-charger.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
index c843eaff8ad0..c3ed7b476676 100644
--- a/drivers/power/supply/cpcap-charger.c
+++ b/drivers/power/supply/cpcap-charger.c
@@ -458,6 +458,7 @@ static void cpcap_usb_detect(struct work_struct *work)
goto out_err;
}
+ power_supply_changed(ddata->usb);
return;
out_err: