Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753404AbbBXU55 (ORCPT ); Tue, 24 Feb 2015 15:57:57 -0500 Received: from cantor2.suse.de ([195.135.220.15]:36429 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753055AbbBXU5y (ORCPT ); Tue, 24 Feb 2015 15:57:54 -0500 From: NeilBrown To: Samuel Ortiz , Tony Lindgren , Lee Jones , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse Date: Tue, 24 Feb 2015 15:33:53 +1100 Subject: [PATCH 15/15] twl4030_charger: assume a 'charger' can supply maximum current. Cc: GTA04 owners , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Message-ID: <20150224043353.4243.7374.stgit@notabene.brown> In-Reply-To: <20150224043341.4243.23291.stgit@notabene.brown> References: <20150224043341.4243.23291.stgit@notabene.brown> 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: 1040 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 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/