19 May, 2010

1 commit

  • This fixes a race between power supply device and initial
    attributes creation, plus makes it possible to implement
    writable properties.

    [Daniel Mack - removed superflous return statement
    and dropped .mode attribute from POWER_SUPPLY_ATTR]

    Suggested-by: Greg KH
    Suggested-by: Kay Sievers
    Signed-off-by: Anton Vorontsov
    Tested-by: Daniel Mack

    Anton Vorontsov
     

13 Oct, 2007

1 commit

  • This changes the uevent buffer functions to use a struct instead of a
    long list of parameters. It does no longer require the caller to do the
    proper buffer termination and size accounting, which is currently wrong
    in some places. It fixes a known bug where parts of the uevent
    environment are overwritten because of wrong index calculations.

    Many thanks to Mathieu Desnoyers for finding bugs and improving the
    error handling.

    Signed-off-by: Kay Sievers
    Cc: Mathieu Desnoyers
    Cc: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     

10 Jul, 2007

1 commit

  • This class is result of "external power" and "battery" classes merge,
    as suggested by David Woodhouse. He also implemented uevent support.

    Here how userspace seeing it now:

    # ls /sys/class/power\ supply/
    ac main-battery usb

    # cat /sys/class/power\ supply/ac/type
    AC

    # cat /sys/class/power\ supply/usb/type
    USB

    # cat /sys/class/power\ supply/main-battery/type
    Battery

    # cat /sys/class/power\ supply/ac/online
    1

    # cat /sys/class/power\ supply/usb/online
    0

    # cat /sys/class/power\ supply/main-battery/status
    Charging

    # cat /sys/class/leds/h5400\:red-left/trigger
    none h5400-radio timer hwtimer ac-online usb-online
    main-battery-charging-or-full [main-battery-charging]
    main-battery-full

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David Woodhouse
    Signed-off-by: Andrew Morton

    Anton Vorontsov