From: Pavel Machek Date: Thu, 27 Dec 2018 19:52:21 +0000 (+0100) Subject: cpcap-charger: generate events for userspace X-Git-Tag: v5.4-rc1~1475^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd10606f93a149a9f3d37574e5385b083b4a7b32;p=platform%2Fkernel%2Flinux-rpi.git cpcap-charger: generate events for userspace 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 Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c index c843eaf..c3ed7b4 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: