power_supply: Add min/max alert properties for CAPACITY, TEMP, TEMP_AMBIENT
authorRamakrishna Pallala <ramakrishna.pallala@intel.com>
Thu, 5 Jul 2012 11:29:12 +0000 (16:59 +0530)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Sat, 14 Jul 2012 03:41:58 +0000 (20:41 -0700)
commite908c41806bdb9151c8f875c4f9d73c6f66e3bc8
treeb8549056773d7686d90a05119f24053995a2d30d
parenta66f59ba2e994bf70274ef0513e24e0e7ae20c63
power_supply: Add min/max alert properties for CAPACITY, TEMP, TEMP_AMBIENT

Minimum and maximum alerts on power supply properties will help or allow
the user space to "proactively" create policies like connect/disconnect
charger or stop/start the user apps based on capacity or temperature
parameters.

These parameters can be used to avoid unnecessary polling from user space
and even from kernel space if the underlying HW can support INT triggers
(ex: max17042/47).

This patch adds the following power supply alert type properties:

 CAPACITY_ALERT_MIN
 CAPACITY_ALERT_MAX
 TEMP_ALERT_MIN
 TEMP_ALERT_MAX
 TEMP_AMBIENT_ALERT_MIN
 TEMP_AMBIENT_ALERT_MAX

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Documentation/power/power_supply_class.txt
drivers/power/power_supply_sysfs.c
include/linux/power_supply.h