30 Jul, 2008

1 commit


10 Jun, 2008

1 commit

  • Commit 54d29ad33e3483bcc7ca433a21cf294854e5154a (Power Supply: fix race
    in device_create) introduced a race in power_supply_uevent. Previously it
    checked that power_supply is available by checking for dev->driver_data.
    But now dev->driver_data is set before power_supply->dev is initialised.

    Signed-off-by: Dmitry Baryshkov
    Signed-off-by: Anton Vorontsov

    Dmitry Baryshkov
     

13 May, 2008

1 commit

  • This adds PROP_CHARGE_COUNTER to the power supply class (documenting it
    as well). The OLPC battery driver uses this for spitting out its ACR
    values (in uAh). We have some rounding errors (the data sheet claims
    416.7, the math actually works out to 416.666667, so we're forced to
    choose between overflows or precision loss. I chose precision loss,
    and stuck w/ data sheet values), but I don't think anyone will care
    that much.

    Signed-off-by: Andres Salomon
    Signed-off-by: Anton Vorontsov

    Andres Salomon
     

08 Feb, 2008

2 commits

  • * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (112 commits)
    ACPI: fix build warning
    Revert "cpuidle: build fix for non-x86"
    ACPI: update intrd DSDT override console messages
    ACPI: update DSDT override documentation
    ACPI: Add "acpi_no_initrd_override" kernel parameter
    ACPI: its a directory not a folder....
    ACPI: misc cleanups
    ACPI: add missing prink prefix strings
    ACPI: cleanup acpi.h
    ACPICA: fix CONFIG_ACPI_DEBUG_FUNC_TRACE build
    ACPI: video: Ignore ACPI video devices that aren't present in hardware
    ACPI: video: reset brightness on resume
    ACPI: video: call ACPI notifier chain for ACPI video notifications
    ACPI: create notifier chain to get hotkey events to graphics driver
    ACPI: video: delete unused display switch on hotkey event code
    ACPI: video: create "brightness_switch_enabled" modparam
    cpuidle: Add a poll_idle method
    ACPI: cpuidle: Support C1 idle time accounting
    ACPI: enable MWAIT for C1 idle
    ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling
    ...

    Linus Torvalds
     
  • This commit:

    commit 8efe444038a205e79b38b7ad03878824901849a8
    Author: Andres Salomon
    Date: Wed Dec 12 14:12:56 2007 -0500

    power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL

    Removed CAPACITY_LEVEL from every other code, leaving the array with sysfs
    attributes with one more entry than the number of enums in power_supply.h.
    This leads to some attributes containing the value of the attribute right
    after it. For example, temp_ambient would have the value of
    time_to_empty_now. In my case, I had time_to_full_avg have the value which
    should be in model_name, when the former was usually empty.

    Cc: Andres Salomon
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thadeu Lima de Souza Cascardo
     

06 Feb, 2008

1 commit


02 Feb, 2008

4 commits

  • Add LiMn (one of the most common for small non-rechargable batteries)
    battery technology and voltage_min/_max properties support.

    Signed-off-by: Dmitry Baryshkov
    Signed-off-by: Anton Vorontsov

    Dmitry Baryshkov
     
  • In power_supply_create_attrs(), we create static attributes as referenced
    by power_supply_static_attrs[i]. After that, if we fail, we unregister
    via power_supply_static_attrs[psy->properties[i]]. This is incorrect, as
    psy->properties has absolutely no bearing on static attribs. This patch
    fixes it to unregister the correct attrib.

    Another line which was unnecessarily line wrapped is also unwrapped.

    Signed-off-by: Andres Salomon
    Signed-off-by: David Woodhouse

    Andres Salomon
     
  • The CAPACITY_LEVEL stuff defines various levels of charge; however, what
    is the difference between them? What differentiates between HIGH and NORMAL,
    LOW and CRITICAL, etc?

    As it appears that these are fairly arbitrary, we end up making such policy
    decisions in the kernel (or in hardware). This is the sort of decision that
    should be made in userspace, not in the kernel.

    If the hardware does not support _CAPACITY and it cannot be easily calculated,
    then perhaps the driver should register a custom CAPACITY_LEVEL attribute;
    however, userspace should not become accustomed to looking for such a thing,
    and we should certainly not encourage drivers to provide CAPACITY_LEVEL
    stubs.

    The following removes support for POWER_SUPPLY_PROP_CAPACITY_LEVEL. The
    OLPC battery driver is the only driver making use of this, so it's
    removed from there as well.

    Signed-off-by: Andres Salomon
    Signed-off-by: David Woodhouse

    Andres Salomon
     
  • Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Anton Vorontsov

    Adrian Bunk
     

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
     

21 Sep, 2007

1 commit


16 Jul, 2007

1 commit


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