From: Pavankumar Kondeti <pkondeti@codeaurora.org>
To: linux-usb@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org,
Pavankumar Kondeti <pkondeti@codeaurora.org>
Subject: [RFC 4/5] USB: EHCI: Notify HCD about HNP enabled port suspend
Date: Wed, 15 Dec 2010 16:44:13 +0530 [thread overview]
Message-ID: <1292411654-21382-5-git-send-email-pkondeti@codeaurora.org> (raw)
In-Reply-To: <1292411654-21382-1-git-send-email-pkondeti@codeaurora.org>
Introduce start_hnp callback function for HCD to receive notification
from EHCI core that HNP enabled port is suspended. HCD may initiate
HNP or notify the same to OTG via otg_start_hnp().
This patch is inspired by "USB: Hook start_hnp into ohci struct"
(e8b24450).
Change-Id: I8e258a6fdf42c166ea9cb3a727e4d3d28a8adc72
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
---
drivers/usb/host/ehci-hub.c | 11 +++++++++++
drivers/usb/host/ehci.h | 2 ++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 796ea0c..65bf104 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -1018,6 +1018,17 @@ static int ehci_hub_control (
|| (temp & PORT_RESET) != 0)
goto error;
+#ifdef CONFIG_USB_OTG
+ if (hcd->self.otg_port == (wIndex + 1) &&
+ hcd->self.b_hnp_enable &&
+ ehci->start_hnp) {
+ ehci_writel(ehci, temp | PORT_SUSPEND,
+ status_reg);
+ set_bit(wIndex, &ehci->suspended_ports);
+ ehci->start_hnp(ehci);
+ break;
+ }
+#endif
/* After above check the port must be connected.
* Set appropriate bit thus could put phy into low power
* mode if we have hostpc feature
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index fd1c53d..a4989f2 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -122,6 +122,8 @@ struct ehci_hcd { /* one per controller */
ktime_t last_periodic_enable;
u32 command;
+ void (*start_hnp)(struct ehci_hcd *ehci);
+
/* SILICON QUIRKS */
unsigned no_selective_suspend:1;
unsigned has_fsl_port_bug:1; /* FreeScale */
--
1.7.1
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2010-12-15 11:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-15 11:14 [RFC 0/5] USB core changes for supporting OTG on MSM SoC Pavankumar Kondeti
2010-12-15 11:14 ` [RFC 1/5] USB: core: Add input prompt and help text for USB_OTG config Pavankumar Kondeti
2010-12-15 12:35 ` Sergei Shtylyov
2010-12-15 21:52 ` Greg KH
2010-12-16 8:53 ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 2/5] USB: core: OTG Supplement Revision 2.0 updates Pavankumar Kondeti
2010-12-15 12:16 ` Felipe Balbi
2010-12-15 21:39 ` Alan Stern
2010-12-16 8:10 ` Felipe Balbi
2010-12-16 8:54 ` Pavan Kondeti
2010-12-16 9:11 ` Felipe Balbi
2010-12-15 21:29 ` Alan Stern
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 21:53 ` Greg KH
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 3/5] USB: gadget: OTG supplement revision " Pavankumar Kondeti
2010-12-15 12:18 ` Felipe Balbi
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 11:14 ` Pavankumar Kondeti [this message]
2010-12-15 12:19 ` [RFC 4/5] USB: EHCI: Notify HCD about HNP enabled port suspend Felipe Balbi
2010-12-16 8:54 ` Pavan Kondeti
2010-12-15 11:14 ` [RFC 5/5] USB: Eliminate delays involved in root hub initialization during HNP Pavankumar Kondeti
2010-12-15 12:21 ` Felipe Balbi
2010-12-16 11:26 ` Pavan Kondeti
2010-12-16 12:15 ` Felipe Balbi
2010-12-16 12:53 ` Pavan Kondeti
2010-12-15 21:52 ` Greg KH
2010-12-15 21:38 ` [RFC 0/5] USB core changes for supporting OTG on MSM SoC Alan Stern
2010-12-16 8:55 ` Pavan Kondeti
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=1292411654-21382-5-git-send-email-pkondeti@codeaurora.org \
--to=pkondeti@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.