aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2007-10-12Driver core: change add_uevent_var to use a structKay Sievers
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 <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-21[PATCH] missing null termination in power supply ueventStephen Hemminger
Need to null terminate environment. Found by inspection while looking for similar problems to platform uevent bug Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-07-23Don't compile the PMU power driver on 64-bit PowerPCPaul Mackerras
As reported by Stephen Rothwell, an allmodconfig build on 64-bit PowerPC reports these errors: ERROR: "pmu_batteries" [drivers/power/pmu_battery.ko] undefined! ERROR: "pmu_battery_count" [drivers/power/pmu_battery.ko] undefined! ERROR: "pmu_power_flags" [drivers/power/pmu_battery.ko] undefined! This fixes the problem by not building pmu_battery.ko on ppc64. There are no battery-powered ppc64 machines with an Apple PMU, and we can be reasonably confident there never will be. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-15Merge git://git.infradead.org/battery-2.6Linus Torvalds
* git://git.infradead.org/battery-2.6: git-battery vs git-acpi Power supply class and drivers: remove non obligatory return statements pda_power: clean up irq, timer MAINTAINERS: Add maintainers for power supply subsystem and drivers Fixed up trivial conflict in drivers/w1/slaves/w1_ds2760.c manually
2007-07-15PDA_POWER depends on having request_irq()Al Viro
... so all proud owners of s390-based PDAs will have to live without that one Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-15Power supply class and drivers: remove non obligatory return statementsAnton Vorontsov
Per Jeff Garzik request. Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
2007-07-15pda_power: clean up irq, timerJeff Garzik
Clean up pda_power interrupt handling: Prior to this patch, the driver would pass information it needed to the interrupt handler dev_id pointer, and then prompt forget it ever did so, recreating that same information after a couple passes through the timer-based state machine. This patch removes the redundant checks by passing the pda_power_supply[] pointer through the state machine. The current code passed 'irq' through the state machine, as an index to recreate the pointer, when we could more simply pass around the pointer itself. This patch makes it easier to remove the 'irq' argument in the future, in addition to cleaning up the driver today. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-10[BATTERY] One Laptop Per Child power/battery driverDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
2007-07-10[BATTERY] Apple PMU driverDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Anton Vorontsov <cbou@mail.ru>
2007-07-10[BATTERY] 1-Wire ds2760 chip battery driverAnton Vorontsov
This is driver for batteries with ds2760 chip inside, found inside almost every HP iPaq and HTC PDAs/phones. Signed-off-by: Anton Vorontsov <cbou@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-10[BATTERY] APM emulation driver for class batteriesAnton Vorontsov
Signed-off-by: Eugeny Boger <eugenyboger@dgap.mipt.ru> Signed-off-by: Anton Vorontsov <cbou@mail.ru> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-10[BATTERY] pda_power platform driverAnton Vorontsov
Common power driver for PDAs and phones with one or two external power supplies (AC/USB) connected to main and backup batteries, and optional builtin charger. It's used to stop logic duplication through different embedded devices. So, power supply *logic* is here. pda_power register power supplies, and will take care about notifying batteries about power changes through external power interface. Currently, power consumption legal limits (including USB power consumption) should be handled by platform code, inside set_charge function. Signed-off-by: Anton Vorontsov <cbou@mail.ru> Signed-off-by: Roman Moravcik <roman.moravcik@gmail.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-07-10[BATTERY] Universal power supply class (was: battery class)Anton Vorontsov
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 <cbou@mail.ru> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>