Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754975AbbG3A36 (ORCPT ); Wed, 29 Jul 2015 20:29:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:43811 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755154AbbG3AZ7 (ORCPT ); Wed, 29 Jul 2015 20:25:59 -0400 From: NeilBrown To: Sebastian Reichel Date: Thu, 30 Jul 2015 10:11:25 +1000 Subject: [PATCH 13/13] twl4030_charger: assume a 'charger' can supply maximum current. Cc: Samuel Ortiz , linux-pm@vger.kernel.org, Tony Lindgren , David Woodhouse , linux-kernel@vger.kernel.org, real GTA04 owners , Dmitry Eremin-Solenikov , Pavel Machek , linux-omap@vger.kernel.org, Lee Jones Message-ID: <20150730001124.4012.1604.stgit@noble> In-Reply-To: <20150730001113.4012.18086.stgit@noble> References: <20150730001113.4012.18086.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1036 Lines: 30 If it cannot, we will stop pulling more current when voltage drops. Signed-off-by: NeilBrown --- 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 2c537ee11bbe..c7432f532a83 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -697,8 +697,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: twl4030_charger_enable_usb(bci, true); break; case USB_EVENT_NONE: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/