linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cpcap-charger: generate events for userspace
@ 2018-12-27 19:52 Pavel Machek
  2018-12-28 20:08 ` Tony Lindgren
  2019-01-20 21:41 ` Sebastian Reichel
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Machek @ 2018-12-27 19:52 UTC (permalink / raw)
  To: Sebastian Reichel, linux-pm, kernel list, linux-arm-kernel,
	linux-omap, tony, nekit1000, mpartap, merlijn

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

    
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>

diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
index 9e8ff5c..7d8b4d5 100644
--- a/drivers/power/supply/cpcap-charger.c
+++ b/drivers/power/supply/cpcap-charger.c
@@ -576,6 +576,7 @@ static void cpcap_usb_detect(struct work_struct *work)
 			goto out_err;
 	}
 
+	power_supply_changed(ddata->usb);
 	return;
 
 out_err:

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-21  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 19:52 cpcap-charger: generate events for userspace Pavel Machek
2018-12-28 20:08 ` Tony Lindgren
2019-01-20 21:41 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).