smb347-charger: Fix battery status reporting logic for charger faults
authorRamakrishna Pallala <ramakrishna.pallala@intel.com>
Tue, 18 Sep 2012 16:28:07 +0000 (21:58 +0530)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Thu, 20 Sep 2012 21:44:45 +0000 (14:44 -0700)
commit1502cfe19bac2f8490e4167f2b7cb50b9759b273
tree808e34627e5b4a68d703cceb2fed818f3195b141
parentec60ea5cd6c9f4b249de1580b8ebfa430055008c
smb347-charger: Fix battery status reporting logic for charger faults

This patch checks for charger status register for determining the
battery charging status and reports Discharing/Charging/Not Charging/Full
accordingly.

This patch also adds the interrupt support for Safety Timer Expiration.
This interrupt is helpful in debugging the cause for charger fault.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
drivers/power/smb347-charger.c