History log of /drivers/power/power_supply.h
Revision Date Author Comments
51990e825431089747f8896244b5c17d3a6423f1 22-Jan-2012 Paul Gortmaker <paul.gortmaker@windriver.com> device.h: cleanup users outside of linux/include (C files)

For files that are actively using linux/device.h, make sure
that they call it out. This will allow us to clean up some
of the implicit uses of linux/device.h within include/*
without introducing build regressions.

Yes, this was created by "cheating" -- i.e. the headers were
cleaned up, and then the fallout was found and fixed, and then
the two commits were reordered. This ensures we don't introduce
build regressions into the git history.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
5f487cd34f4337f9bc27ca19da72a39d1b0a0ab4 18-May-2010 Anton Vorontsov <cbouatmailru@gmail.com> power_supply: Use attribute groups

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 <gregkh@suse.de>
Suggested-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
7eff2e7a8b65c25920207324e56611150eb1cd9a 14-Aug-2007 Kay Sievers <kay.sievers@vrfy.org> Driver core: change add_uevent_var to use a struct

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>
4a11b59d8283662193a9c6a9c14c58d1b9bf0617 03-May-2007 Anton Vorontsov <cbou@mail.ru> [BATTERY] Universal power supply class (was: battery class)

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>