cpcap-charger: generate events for userspace
authorPavel Machek <pavel@ucw.cz>
Thu, 27 Dec 2018 19:52:21 +0000 (20:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:10:09 +0000 (20:10 +0100)
commit4ea4f347662c4d4eb53eade5c4a188f3699373be
tree30fb1848a6358ec8cd97c653ee74c5641cc5905d
parentce02d82c4e1aaf2fd6ef40a43e5e7ace3c817088
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>
drivers/power/supply/cpcap-charger.c