Thread (1 message) 1 message, 1 author, 2013-12-13

[PATCH v6 07/15] usb: phy: add notify suspend and resume callback

From: Peter Chen <hidden>
Date: 2013-12-13 06:23:35
Also in: linux-devicetree

On Fri, Dec 13, 2013 at 12:27 PM, Felipe Balbi [off-list ref] wrote:
On Fri, Dec 13, 2013 at 09:23:37AM +0800, Peter Chen wrote:
quoted
They are used to notify PHY that the controller enters suspend
or finishes resume.

Signed-off-by: Peter Chen <redacted>
---
 include/linux/usb/phy.h |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 6c0b1c5..a747960 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -116,6 +116,11 @@ struct usb_phy {
                      enum usb_device_speed speed);
      int     (*notify_disconnect)(struct usb_phy *x,
                      enum usb_device_speed speed);
+     int     (*notify_suspend)(struct usb_phy *x,
+                     enum usb_device_speed speed);
+     int     (*notify_resume)(struct usb_phy *x,
+                     enum usb_device_speed speed);
+
I still don't think this is necessary. Why don't you just call
usb_phy_set_suspend() directly ? And why do you need the extra speed
argument ?

--
It is different with PHY's power/clock.

Eg, for .notify_resume, it needs to be called after host controller finishes
 sending resume signal. If its operation is executed before controller sends
resume signal, the disconnect operation during the resume will not be detected.

.notify_suspend and .notify_resume needs to be called during ehci suspend/
resume operation for mxs-phy typed controller.

For mxs-phy, this operation is only needed for high speed connection,
and to aligned with .nofity_connect/.notify_disconnect, I added the speed
argument. If the user doesn't need it, it can pass USB_SPEED_UNKNOWN like
below post.

http://marc.info/?l=linux-usb&m=138418998118519&w=2

BR,
Peter Chen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help