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] [day] [month] [year] [list]
Message-id: <1409028099-6081-3-git-send-email-cw00.choi@samsung.com>
Date:	Tue, 26 Aug 2014 13:41:39 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	sre@...nel.org, dbaryshkov@...il.com, dwmw2@...radead.org
Cc:	myungjoo.ham@...sung.com, jonghwa3.lee@...sung.com,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Chanwoo Choi <cw00.choi@...sung.com>
Subject: [PATCH 2/2] power: charger-manager: Check charging state right after
 completed initialization

This patch check the charging state after completed initialization of charger-
manager and update current charging state. If charger-manager never check and
update current charging state, charger-manager would have the mismatch issue
between real state of cable connection and the charging state of charger-manager
until first polling time of charger-manager.

Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
Acked-by: Myungjoo Ham <myungjoo.ham@...sung.com>
Cc: Sebastian Reichel <sre@...nel.org>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
Cc: David Woodhouse <dwmw2@...radead.org>
---
 drivers/power/charger-manager.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index a10fb57..4e560f7 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -1839,6 +1839,13 @@ static int charger_manager_probe(struct platform_device *pdev)
 	device_init_wakeup(&pdev->dev, true);
 	device_set_wakeup_capable(&pdev->dev, false);
 
+	/*
+	 * Charger-manager have to check the charging state right after
+	 * tialization of charger-manager and then update current charging
+	 * state.
+	 */
+	cm_monitor();
+
 	schedule_work(&setup_polling);
 
 	return 0;
-- 
1.8.0

--
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