]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
power_supply: Add function to return system-wide power state
authorMatthew Garrett <mjg59@srcf.ucam.org>
Tue, 26 Aug 2008 20:09:59 +0000 (21:09 +0100)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Sun, 31 Aug 2008 22:42:54 +0000 (02:42 +0400)
commit942ed161944b3476639916cf544e6975b29c985a
treea05e3bd0d6b59de318f3bfc5557502c13dde1bc4
parente82374fd1a804e197fc2a54c3930e70c5d300abc
power_supply: Add function to return system-wide power state

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 <mjg@redhat.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/power_supply_core.c
include/linux/power_supply.h