max17042_battery: Add suspend/resume hooks
authorSyed Rafiuddin <srafiuddin@nvidia.com>
Mon, 3 Sep 2012 05:49:38 +0000 (10:49 +0530)
committerVarun Colbert <vcolbert@nvidia.com>
Tue, 11 Sep 2012 19:39:45 +0000 (12:39 -0700)
commit1cd41ed0305ddf8a50734987c2fdb035051b543b
tree35d932edc754bbe16a9853c1bfd6a8c99c1218fb
parent5b3760e18e744556474a1d827afc5aeec4005102
max17042_battery: Add suspend/resume hooks

This patch adds suspend/resume methods to the driver.

In suspend method irq line is disabled to avoid i2c
read/write errors from the interrupt handler as the
i2c bus itself could be in suspend state.
In resume function irq line will be re-enabled.

(cherry picked from commit 48bc177441d68c0ba70631beb544c3d695328d56)

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>

Change-Id: Id4129ae087e73ab72ecd415772e559573770fe86
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/130586
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
drivers/power/max17042_battery.c