ACPI / battery: introduce support for POWER_SUPPLY_PROP_CAPACITY_LEVEL
authorZhang Rui <rui.zhang@intel.com>
Wed, 28 May 2014 07:23:36 +0000 (15:23 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 30 May 2014 11:45:24 +0000 (13:45 +0200)
commit1ac5aaa67290b397712e4410de7f067d5cd85871
treec44021fda631460070b1a5b90cbefb3acb356756
parentcbcd085da2f99a8b36a07256dd7d1aae38b1d80f
ACPI / battery: introduce support for POWER_SUPPLY_PROP_CAPACITY_LEVEL

ACPI battery device receives notifications when
1. the remaining battery capacity becomes critical low
2. the trip point set by the _BTP (Design capacity of Warning by default)
   is reached or crossed.

So it is able to support POWER_SUPPLY_PROP_CAPACITY_LEVEL to report
        POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,
        POWER_SUPPLY_CAPACITY_LEVEL_LOW,
        POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,
        POWER_SUPPLY_CAPACITY_LEVEL_FULL,
capacity levels to power supply core and user space.

Introduce support for POWER_SUPPLY_PROP_CAPACITY_LEVEL in this patch.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/battery.c