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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150730001124.4012.1604.stgit@noble>
Date:	Thu, 30 Jul 2015 10:11:25 +1000
From:	NeilBrown <neil@...wn.name>
To:	Sebastian Reichel <sre@...nel.org>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>, linux-pm@...r.kernel.org,
	Tony Lindgren <tony@...mide.com>,
	David Woodhouse <dwmw2@...radead.org>,
	linux-kernel@...r.kernel.org,
	real GTA04 owners <gta04-owner@...delico.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	Pavel Machek <pavel@....cz>, linux-omap@...r.kernel.org,
	Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 13/13] 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 <neil@...wn.name>
---
 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@...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