power: supply: act8945a_charger: Improve state handling
authorWenyou Yang <wenyou.yang@atmel.com>
Thu, 25 Aug 2016 07:19:52 +0000 (15:19 +0800)
committerSebastian Reichel <sre@kernel.org>
Wed, 31 Aug 2016 14:46:54 +0000 (16:46 +0200)
commit1f0ba4067af4bda55b7304e74fc20a245912b728
tree42ae5b0c2505c18adb90897d87255ef086c235b1
parent6b021fc91038201ed44e99ae32b6a93c6e8be1f4
power: supply: act8945a_charger: Improve state handling

When get the property, first check the charger state machine,
then check the status bit to decide what value is assigned to
the corresponding property.

Retain the SUSCHG bit of REG 0x71 when configure the timers to
avoid losting the charger suspending info after boot.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/act8945a_charger.c