[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1418957250-6542-9-git-send-email-jonghwa3.lee@samsung.com>
Date: Fri, 19 Dec 2014 11:47:28 +0900
From: Jonghwa Lee <jonghwa3.lee@...sung.com>
To: linux-kernel@...r.kernel.org
Cc: linux-pm@...r.kernel.org, sre@...nel.org, dbaryshkov@...il.com,
dwmw2@...radead.org, anton@...msg.org, pavel@....cz,
myungjoo.ham@...sung.com, cw00.choi@...sung.com,
Jonghwa Lee <jonghwa3.lee@...sung.com>
Subject: [PATCH RESEND v2 08/10] power: charger-manager: Not to start charging
directly in cable nofitication.
This patch prevents direct charging control in cable notification.
It sets only input current limit according to cable type and yields charging
control to be done by cm_monitor() where charging management proceeds.
It may loose few ms to enable charging compared to before, even though it's
more important that charging is enabled always in safe context.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@...sung.com>
---
drivers/power/charger-manager.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index 065b92a..1ccb9be 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -849,7 +849,8 @@ static void charger_extcon_work(struct work_struct *work)
cable->min_uA, cable->max_uA);
}
- try_charger_enable(cable->cm, cable->attached);
+ cancel_delayed_work(&cm_monitor_work);
+ queue_delayed_work(cm_wq, &cm_monitor_work, 0);
}
/**
@@ -873,15 +874,6 @@ static int charger_extcon_notifier(struct notifier_block *self,
cable->attached = event;
/*
- * Setup monitoring to check battery state
- * when charger cable is attached.
- */
- if (cable->attached && is_polling_required(cable->cm)) {
- cancel_work_sync(&setup_polling);
- schedule_work(&setup_polling);
- }
-
- /*
* Setup work for controlling charger(regulator)
* according to charger cable.
*/
--
1.7.9.5
--
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