13 Mar, 2009

1 commit

  • The 'battery remaining capacity' calculation in
    drivers/power/ds2760_battery.c lacks a parameter check to a division
    operation which causes the kernel to oops on my board.

    [ 21.233750] Division by zero in kernel.
    [ 21.237646] [] (__div0+0x0/0x20) from [] (Ldiv0+0x8/0x10)
    [ 21.244816] [] (ds2760_battery_read_status+0x0/0x2a4) from [] (ds2760_battery_get_property+0x30/0xdc)
    [ 21.255803] r8:c03a22c0 r7:c7886100 r6:00000009 r5:c782fe7c r4:c7886084
    [ 21.262518] [] (ds2760_battery_get_property+0x0/0xdc) from [] (power_supply_show_property+0x48/0x114)
    [ 21.273480] r6:c7996000 r5:00000009 r4:00000000
    [ 21.278111] [] (power_supply_show_property+0x0/0x114) from [] (power_supply_uevent+0x188/0x280)
    [ 21.288537] r8:00000001 r7:c7886100 r6:c7996000 r5:000000b4 r4:00000000
    [ 21.295222] [] (power_supply_uevent+0x0/0x280) from [] (dev_uevent+0xd4/0x10c)
    [ 21.304199] [] (dev_uevent+0x0/0x10c) from [] (kobject_uevent_env+0x180/0x390)
    [ 21.313170] r5:00000000 r4:c78860ac
    [ 21.316725] [] (kobject_uevent_env+0x0/0x390) from [] (kobject_uevent+0x14/0x18)
    [ 21.325850] [] (kobject_uevent+0x0/0x18) from [] (power_supply_changed_work+0x5c/0x70)
    [ 21.335506] [] (power_supply_changed_work+0x0/0x70) from [] (run_workqueue+0xbc/0x144)
    [ 21.345167] r4:c7812040
    [ 21.347716] [] (run_workqueue+0x0/0x144) from [] (worker_thread+0xa8/0xbc)
    [ 21.356296] r7:c7812040 r6:c7820b00 r5:c782ffa4 r4:c7812048
    [ 21.361957] [] (worker_thread+0x0/0xbc) from [] (kthread+0x5c/0x94)
    [ 21.369971] r7:00000000 r6:c004d8a4 r5:c7812040 r4:c782e000
    [ 21.375612] [] (kthread+0x0/0x94) from [] (do_exit+0x0/0x688)

    Signed-off-by: Daniel Mack
    Cc: Szabolcs Gyurko
    Acked-by: Matt Reimer
    Acked-by: Anton Vorontsov
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Mack
     

03 Feb, 2009

1 commit


26 Jan, 2009

1 commit


11 Jan, 2009

1 commit


07 Jan, 2009

1 commit


04 Jan, 2009

5 commits


21 Oct, 2008

1 commit

  • * git://git.infradead.org/battery-2.6:
    bq27x00_battery: use unaligned access helper
    power_supply: fix dependency of tosa_battery
    power_supply: Support for Texas Instruments BQ27200 battery managers
    power_supply: Add function to return system-wide power state
    pda_power: Check and handle return value of set_irq_wake

    Linus Torvalds
     

20 Oct, 2008

1 commit

  • Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs
    attribute->owner unnecessary. But the field was left in the structure to
    ease the merge. It's been over a year since that change and it is now
    time to start killing attribute->owner along with its users - one arch at
    a time!

    This patch is attempt #1 to get rid of attribute->owner only for
    CONFIG_X86_64 or CONFIG_X86_32 . We will deal with other arches later on
    as and when possible - avr32 will be the next since that is something I
    can test. Compile (make allyesconfig / make allmodconfig / custom config)
    and boot tested.

    akpm: the idea is that we put the declaration of sttribute.owner inside
    `#ifndef CONFIG_X86'. But that proved to be too ambitious for now because
    new usages kept on turning up in subsystem trees.

    [akpm: remove the ifdef for now]
    Signed-off-by: Parag Warudkar
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Tejun Heo
    Cc: Len Brown
    Cc: Jens Axboe
    Cc: Jean Delvare
    Cc: Roland Dreier
    Cc: David Brownell
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Parag Warudkar
     

19 Oct, 2008

1 commit


17 Oct, 2008

3 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits)
    UIO: Fix mapping of logical and virtual memory
    UIO: add automata sercos3 pci card support
    UIO: Change driver name of uio_pdrv
    UIO: Add alignment warnings for uio-mem
    Driver core: add bus_sort_breadthfirst() function
    NET: convert the phy_device file to use bus_find_device_by_name
    kobject: Cleanup kobject_rename and !CONFIG_SYSFS
    kobject: Fix kobject_rename and !CONFIG_SYSFS
    sysfs: Make dir and name args to sysfs_notify() const
    platform: add new device registration helper
    sysfs: use ilookup5() instead of ilookup5_nowait()
    PNP: create device attributes via default device attributes
    Driver core: make bus_find_device_by_name() more robust
    usb: turn dev_warn+WARN_ON combos into dev_WARN
    debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
    debug: Introduce a dev_WARN() function
    sysfs: fix deadlock
    device model: Do a quickcheck for driver binding before doing an expensive check
    Driver core: Fix cleanup in device_create_vargs().
    Driver core: Clarify device cleanup.
    ...

    Linus Torvalds
     
  • Signed-off-by: Harvey Harrison
    Acked-by: Andres Salomon
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • Now that device_create() has been audited, rename things back to the
    original call to be sane.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

13 Oct, 2008

1 commit


03 Oct, 2008

1 commit


26 Sep, 2008

2 commits


01 Sep, 2008

3 commits

  • These battery managers came in two different packages: one for I2C
    busses (BQ27200) and one for HDQ busses (BQ27000).

    This driver currently supports only the I2C chip version but the code
    is designed in order to easily allow the HDQ chip version integration.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: make things static, use kasprintf()]
    Signed-off-by: Rodolfo Giometti
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Anton Vorontsov

    Rodolfo Giometti
     
  • Certain drivers benefit from knowing whether the system is on ac or
    battery, for instance when determining which backlight registers to
    read. This adds a simple call to determine whether there's an online
    power supply other than any batteries.

    Signed-off-by: Matthew Garrett
    Signed-off-by: Anton Vorontsov

    Matthew Garrett
     
  • The recent change in commit 2db873211ba47ef704c301f9ecf4a33413a0b649
    forces the calls enable_irq_wake() and disable_irq_wake() to
    be balanced. But if in pda_power_suspend() the call to
    enable_irq_wake() fails (because attached gpio cannot wake
    up the CPU), the corresponding disable_irq_wake will WARN().
    Fix it by storing success/failure of enable_irq_wake().

    Signed-off-by: Robert Jarzmik
    Signed-off-by: Anton Vorontsov

    Robert Jarzmik
     

07 Aug, 2008

1 commit


30 Jul, 2008

1 commit


26 Jul, 2008

1 commit

  • Since 43cc71eed1250755986da4c0f9898f9a635cb3bf ("platform: prefix MODALIAS
    with "platform:"), the platform modalias is prefixed with "platform:".
    Add MODULE_ALIAS() to the hotpluggable "power" drivers drivers, to
    re-enable auto loading.

    [dbrownell@users.sourceforge.net: one was missing]
    Signed-off-by: Kay Sievers
    Signed-off-by: David Brownell
    Cc: Greg KH
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kay Sievers
     

24 Jul, 2008

1 commit

  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (85 commits)
    [ARM] pxa: add base support for PXA930 Handheld Platform (aka SAAR)
    [ARM] pxa: add base support for PXA930 Evaluation Board (aka TavorEVB)
    [ARM] pxa: add base support for PXA930 (aka Tavor-P)
    [ARM] Update mach-types
    [ARM] pxa: make littleton to use the new smc91x platform data
    [ARM] pxa: make zylonite to use the new smc91x platform data
    [ARM] pxa: make mainstone to use the new smc91x platform data
    [ARM] pxa: make lubbock to use new smc91x platform data
    [NET] smc91x: prepare SMC_USE_PXA_DMA to be specified in platform data
    [NET] smc91x: prepare for SMC_IO_SHIFT to be a platform configurable variable
    [NET] smc91x: add SMC91X_NOWAIT flag to platform data
    [NET] smc91x: favor the use of SMC91X_USE_* instead of SMC_CAN_USE_*
    [NET] smc91x: remove "irq_flags" from "struct smc91x_platdata"
    [ARM] 5146/1: pxa2xx: convert all boards to call pxa2xx_transceiver_mode helper
    Support for LCD on e740 e750 e400 and e800 e-series PDAs
    E-series UDC support
    PXA UDC - allow use of inverted GPIO for pullup
    Add e350 support
    Fix broken e-series build
    E-series GPIO / IRQ definitions.
    ...

    Linus Torvalds
     

22 Jul, 2008

1 commit


10 Jul, 2008

1 commit


01 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
     

21 May, 2008

1 commit

  • There is a race from when a device is created with device_create() and
    then the drvdata is set with a call to dev_set_drvdata() in which a
    sysfs file could be open, yet the drvdata will be NULL, causing all
    sorts of bad things to happen.

    This patch fixes the problem by using the new function,
    device_create_drvdata().

    Cc: Kay Sievers
    Cc: Anton Vorontsov
    Cc: David Woodhouse
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

19 May, 2008

1 commit


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
     

04 May, 2008

5 commits


03 May, 2008

1 commit

  • By changing drivers/power/pmu_battery.c I now have '_' instead of
    ' ' (spaces) in /sys:

    /sys/devices/platform/pmu-battery.0/power_supply/PMU_battery_0
    /sys/class/power_supply/PMU_battery_0

    I'm still not sure if some userspace tool out there uses the old paths and
    will break now.

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

    Christian Kujau