[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150224043353.4243.7374.stgit@notabene.brown>
Date: Tue, 24 Feb 2015 15:33:53 +1100
From: NeilBrown <neilb@...e.de>
To: Samuel Ortiz <sameo@...ux.intel.com>,
Tony Lindgren <tony@...mide.com>,
Lee Jones <lee.jones@...aro.org>,
Sebastian Reichel <sre@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>
Cc: GTA04 owners <gta04-owner@...delico.com>,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: [PATCH 15/15] twl4030_charger: assume a 'charger' can supply
maximum current.
If it cannot, we will stop pulling more current when voltage drops.
Signed-off-by: NeilBrown <neilb@...e.de>
---
drivers/power/twl4030_charger.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 7ad6b4b531d7..89e2c121dd22 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -691,8 +691,10 @@ static void twl4030_bci_usb_work(struct work_struct *data)
struct twl4030_bci *bci = container_of(data, struct twl4030_bci, work);
switch (bci->event) {
- case USB_EVENT_VBUS:
case USB_EVENT_CHARGER:
+ bci->usb_cur = USB_MAX_CURRENT;
+ /* FALL THROUGH */
+ case USB_EVENT_VBUS:
case USB_EVENT_ENUMERATED:
twl4030_charger_enable_usb(bci, true);
break;
--
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