lkml.org 
[lkml]   [2018]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subjectcpcap-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 <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
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2018-12-27 20:53    [W:3.230 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site