diff options
author | Marcus Cooper <marcus.xm.cooper@stericsson.com> | 2012-08-16 09:09:33 +0200 |
---|---|---|
committer | Mathieu J. Poirier <mathieu.poirier@linaro.org> | 2012-09-18 07:54:47 -0600 |
commit | a473ccd2f26e53ef538e3b325eb7060338b5ac14 (patch) | |
tree | 29f63c5f44503114e1c72e8bee0242f86f5e941f | |
parent | cb697c6eefe834a85d8f30ea60b42cd62683c2e2 (diff) |
power: ab8500: Fix quick re-attach charger issue.
The patch for 426250 added a change to check for the quick
re-attachment of the charger connection as an error in the
AB8500 HW meant that a quick detach/attach wouldn't be
detected.
This patch isolates the original change so that newer AB's
are not affected.
Signed-off-by: Marcus Cooper <marcus.xm.cooper@stericsson.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@stericsson.com>
Reviewed-by: Hakan BERG <hakan.berg@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rw-r--r-- | drivers/power/abx500_chargalg.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index c8849afd8aa6..7a81e4e8a635 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -1299,11 +1299,12 @@ static void abx500_chargalg_algorithm(struct abx500_chargalg *di) abx500_chargalg_check_charger_voltage(di); charger_status = abx500_chargalg_check_charger_connection(di); - ret = abx500_chargalg_check_charger_enable(di); - if (ret < 0) - dev_err(di->dev, "Checking charger if enabled error: %d line: %d\n", - ret, __LINE__); - + if (is_ab8500(di->parent)) { + ret = abx500_chargalg_check_charger_enable(di); + if (ret < 0) + dev_err(di->dev, "Checking charger is enabled error"); + dev_err(di->dev, ": Returned Value %d\n", ret); + } /* * First check if we have a charger connected. * Also we don't allow charging of unknown batteries if configured |