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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1307526281-12125-4-git-send-email-krohei@gmail.com>
Date:	Wed,  8 Jun 2011 12:44:41 +0300
From:	Heikki Krogerus <krohei@...il.com>
To:	Greg KH <gregkh@...e.de>, Anton Vorontsov <cbouatmailru@...il.com>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Grazvydas Ignotas <notasas@...il.com>
Subject: [PATCH 3/3] twl4030_charger:  Handle suspended and resumed events

To prevent charging when the bus is suspended, handling
suspended and resumed events.

Signed-off-by: Heikki Krogerus <krohei@...il.com>
Cc: Grazvydas Ignotas <notasas@...il.com>
---
 drivers/power/twl4030_charger.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 92c16e1..461c389 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -268,11 +268,15 @@ static void twl4030_bci_usb_work(struct work_struct *data)
 	switch (bci->event) {
 	case USB_EVENT_VBUS:
 	case USB_EVENT_CHARGER:
+	case USB_EVENT_RESUMED:
 		twl4030_charger_enable_usb(bci, true);
 		break;
 	case USB_EVENT_NONE:
+	case USB_EVENT_SUSPENDED:
 		twl4030_charger_enable_usb(bci, false);
 		break;
+	default:
+		break;
 	}
 }
 
-- 
1.7.4.1

--
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