max170xx_battery: disable shutdown methods from user space
authorRamakrishna Pallala <ramakrishna.pallala@intel.com>
Fri, 18 May 2012 16:18:58 +0000 (21:48 +0530)
committerbuildbot <buildbot@intel.com>
Wed, 23 May 2012 08:38:48 +0000 (01:38 -0700)
commit07128e141feb41eb81526180ec095ce9dd3ee4c5
tree061856de95031a2325b7ae16c56dc7a2598d12bb
parenta62b1fe4585d97e1ca82c63f3a71e675b2de2694
max170xx_battery: disable shutdown methods from user space

BZ: 19950

This patch enables the user space to disable default shutdown
methods set by platform. By adding the disable_shutdown_methods
sysfs interface under its device directory so the user space write
into this file to disable the shutdown methods.

Usage:
To disable default fuel gauge based shutdown:
echo 1 > disable_shutdown_methods

To disable OCV based shutdown:
echo 2 > disable_shutdown_methods

To disable LOWBATT based shutdown:
echo 4 > disable_shutdown_methods

To disable all types of shutdown:
echo 7 > disable_shutdown_methods

Change-Id: Ic10034d3cf2a59fb05fa09f518d96cc843c3ea4b
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Reviewed-on: http://android.intel.com:8080/49426
Reviewed-by: Tc, Jenny <jenny.tc@intel.com>
Reviewed-by: Koskinen, Ilkka <ilkka.koskinen@intel.com>
Reviewed-by: Jena, TapanX <tapanx.jena@intel.com>
Tested-by: Kallappa Manjanna, MadhukumarX <madhukumarx.kallappa.manjanna@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/power/max17042_battery.c