From: Heikki Krogerus <krohei@gmail.com>
To: Greg KH <gregkh@suse.de>, Anton Vorontsov <cbouatmailru@gmail.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Grazvydas Ignotas <notasas@gmail.com>
Subject: [PATCH 3/3] twl4030_charger: Handle suspended and resumed events
Date: Wed, 8 Jun 2011 12:44:41 +0300 [thread overview]
Message-ID: <1307526281-12125-4-git-send-email-krohei@gmail.com> (raw)
In-Reply-To: <1307526281-12125-1-git-send-email-krohei@gmail.com>
To prevent charging when the bus is suspended, handling
suspended and resumed events.
Signed-off-by: Heikki Krogerus <krohei@gmail.com>
Cc: Grazvydas Ignotas <notasas@gmail.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
next prev parent reply other threads:[~2011-06-08 9:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-08 9:44 [PATCH 0/3] Support for SUSPEND and RESUME for USB chargers Heikki Krogerus
2011-06-08 9:44 ` [PATCH 1/3] usb: otg: add events for suspend/resume states Heikki Krogerus
2011-06-08 9:44 ` [PATCH 2/3] isp1704_charger: Handle suspended and resumed events Heikki Krogerus
2011-06-08 9:44 ` Heikki Krogerus [this message]
2011-06-08 20:54 ` [PATCH 0/3] Support for SUSPEND and RESUME for USB chargers Greg KH
2011-06-09 11:25 ` Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307526281-12125-4-git-send-email-krohei@gmail.com \
--to=krohei@gmail.com \
--cc=cbouatmailru@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=notasas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox