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: NMatthew Garrett <mjg@redhat.com> Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
Showing
想要评论请 注册 或 登录