29 Apr, 2008

1 commit

  • Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
    be setup before gluing PDE to main tree.

    Add correct ->owner to proc_fops to fix reading/module unloading race.

    Signed-off-by: Denis V. Lunev
    Cc: Len Brown
    Cc: Alexey Dobriyan
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denis V. Lunev
     

18 Mar, 2008

1 commit

  • Acer BIOS has a bug which is exposed when a dead battery is present.

    The package template that is used to describe battery status is
    over-written with sane values when the battery is live.
    But when the batter is dead, a bogus reference in the template
    is used. In this case, Linux returns a fault, when instead
    it should simply return that it doesn't know the missing value.

    http://bugzilla.kernel.org/show_bug.cgi?id=8573
    http://bugzilla.kernel.org/show_bug.cgi?id=10202

    Signed-off-by: Alexey Starikovskiy
    Signed-off-by: Len Brown

    Alexey Starikovskiy
     

06 Feb, 2008

1 commit


02 Jan, 2008

1 commit


07 Dec, 2007

1 commit


20 Nov, 2007

3 commits


14 Nov, 2007

1 commit


09 Nov, 2007

1 commit

  • If a battery is at a critical charge level and not being charged or
    discharged, then the ACPI _BST method will return a state of 4, and
    the current acpi_battery_get_property() code will not set any property
    value for POWER_SUPPLY_PROP_STATUS. This will cause an oops in
    power_supply_show_property() when it reads off the end of the
    status_text array. This actually was causing a 100% reproducible
    crash on boot on my laptop with two batteries, when one battery was
    completely drained and the laptop was not plugged in.

    Fix this by making sure acpi_battery_get_property() returns
    POWER_SUPPLY_STATUS_UNKNOWN for any battery state it doesn't already
    handle explicitly. There doesn't seem to be any status enum value
    defined that makes more sense than 'unknown' for a battery at a
    critical charge level.

    Signed-off-by: Roland Dreier
    Acked-by: Alexey Starikovskiy
    Signed-off-by: Len Brown

    Roland Dreier
     

30 Oct, 2007

3 commits


26 Oct, 2007

2 commits


28 Sep, 2007

5 commits


25 Aug, 2007

1 commit


24 Aug, 2007

2 commits

  • Schedule /proc/acpi/event for removal in 6 months.

    Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event()
    to make sure there is no confusion that it is for /proc/acpi/event only.

    Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event.
    There is no functional change if CONFIG_ACPI_PROC_EVENT=y

    Signed-off-by: Len Brown

    Len Brown
     
  • The previous events patch added a netlink event for every
    user of the legacy /proc/acpi/event interface.

    However, some users of /proc/acpi/event are really input events,
    and they already report their events via the input layer.

    Introduce a new interface, acpi_bus_generate_netlink_event(),
    which is explicitly called by devices that want to repoprt
    events via netlink. This allows the input-like events
    to opt-out of generating netlink events. In summary:

    events that are sent via netlink:
    ac/battery/sbs
    thermal
    processor
    thinkpad_acpi dock/bay

    events that are sent via input layer:
    button
    video hotkey
    thinkpad_acpi hotkey
    asus_acpi/asus-laptop hotkey
    sonypi/sonylaptop

    Signed-off-by: Zhang Rui
    Signed-off-by: Len Brown

    Zhang Rui
     

15 Aug, 2007

1 commit


04 Aug, 2007

1 commit


24 Jul, 2007

1 commit


12 May, 2007

1 commit


22 Apr, 2007

1 commit


07 Mar, 2007

3 commits

  • Signed-off-by: Vladimir Lebedev
    Signed-off-by: Len Brown

    Vladimir Lebedev
     
  • /proc exports _BST in a single file, and _BST is re-evaulated
    whenever that file is read.

    Sometimes user-space reads this file frequently, and on some
    systems _BST takes a long time to evaluate due to a slow EC.

    Further, when we move to sysfs, the values returned from _BST
    will be in multiple files, and evaluating _BST for each
    file read would make matters worse.

    Here code is added to support caching the results of _BST.
    A new module parameter "update_time" tells how many seconds the
    cached _BST should be used before it is re-evaluated.
    Currently, update_time defaults to 0, and so the
    existing behaviour of re-evaluating on each read retained.

    Signed-off-by: Vladimir Lebedev
    Signed-off-by: Len Brown

    Vladimir Lebedev
     
  • Cleanup -- No functional changes.

    Battery state is currently exported in a proc "state" file.
    Update associated #defines and routines to be consistent.

    Signed-off-by: Vladimir Lebedev
    Signed-off-by: Len Brown

    Vladimir Lebedev
     

17 Feb, 2007

1 commit


13 Feb, 2007

3 commits

  • Cosmetic only.

    Except in a single case, #define ACPI_*_DRIVER_NAME
    were invoked 0 or 1 times.

    Signed-off-by: Len Brown

    Len Brown
     
  • It was erroneously used as a description rather than a name.

    ie. turn this:

    lenb@se7525gp2:/sys> ls bus/acpi/drivers
    ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver
    ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver
    ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver
    ACPI container driver ACPI PCI Root Bridge Driver hpet

    into this:

    lenb@se7525gp2:~> ls /sys/bus/acpi/drivers
    ac battery button container ec fan hpet pci_link pci_root power processor thermal

    Signed-off-by: Len Brown

    Len Brown
     
  • cosmetic only

    Make "module name" actually match the file name.
    Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care.
    Fix indentation where Lindent did get confused.

    Signed-off-by: Len Brown

    Len Brown
     

10 Feb, 2007

1 commit


03 Feb, 2007

1 commit


21 Dec, 2006

1 commit


16 Dec, 2006

2 commits

  • Conflicts:

    drivers/acpi/button.c
    drivers/acpi/ec.c
    drivers/acpi/osl.c
    drivers/acpi/sbs.c

    Len Brown
     
  • Add ACPI bus_type for Linux driver model.

    1. .shutdown method is added into acpi_driver.ops
    needed by bus_type operations.
    2. remove useless parameter 'int state' in .resume method.
    3. change parameter 'int state'
    to 'pm_message_t state' in .suspend method.

    Note: The new .uevent method mark ACPI drivers by PNPID instead of by name.
    Udev script needs to look for "HWID=" or "COMPTID=" to load
    ACPI drivers as a result.

    Signed-off-by: Li Shaohua
    Signed-off-by: Zhang Rui
    Signed-off-by: Len Brown

    Patrick Mochel