lkml.org 
[lkml]   [2010]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] ACPI / Battery: Return -ENODATA for unknown values in get_property()
    On Sun, 17 Oct 2010, Sitsofe Wheeler wrote:
    > On Sun, Oct 17, 2010 at 03:19:53AM -0200, Henrique de Moraes Holschuh wrote:
    > > On Sun, 17 Oct 2010, Rafael J. Wysocki wrote:
    > > > In fact, the driver is supposed to return -ENODATA in that case, which will
    > > > result in the read from /sys/class/power_supply/BAT0/current_now
    > > > fail (I guess upower should be able to cope with that).
    > >
    > > ENODATA? Shouldn't it be ENXIO? There is no non-blocking data stream
    > > involved in a sysfs attribute.
    >
    > Using ENODATA and ENXIO appears to solve the problem (upower reports a
    > rate of 0.0). However when plugging the battery in after previously only
    > being on AC power none of the /sys/class/power_supply/BAT0/uevent:*
    > files are created so upower never realises a battery has been plugged
    > in. A further issue with ENXIO is is the following repeatedly appears in
    > dmesg:

    You might have broken firmware that does not issue a notify when a battery
    is plugged. But it has been a long time, I don't recall if the battery
    driver handles hotplugging without the help of the dock/bay driver (it
    should, AFAIK).

    > power_supply BAT0: driver failed to report `current_now' property

    And it keeps silent if it gets ENODATA?

    --
    "One disk to rule them all, One disk to find them. One disk to bring
    them all and in the darkness grind them. In the Land of Redmond
    where the shadows lie." -- The Silicon Valley Tarot
    Henrique Holschuh


    \
     
     \ /
      Last update: 2010-10-17 15:13    [W:0.024 / U:0.124 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site