lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Sep 2012 10:12:53 -0600
From:	mathieu.poirier@...aro.org
To:	linux-kernel@...r.kernel.org, cbou@...l.ru, dwmw2@...radead.org
Cc:	mathieu.poirier@...aro.org
Subject: [PATCH 56/57] power: abx500_chargalg: Fix quick re-attach charger issue.

From: Marcus Cooper <marcus.xm.cooper@...ricsson.com>

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@...ricsson.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@...ricsson.com>
Reviewed-by: Hakan BERG <hakan.berg@...ricsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@...ricsson.com>
---
 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 c8849af..7a81e4e 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
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ