Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1693595 > unrolled thread
| Started by | Manu Gautam <mgautam@codeaurora.org> |
|---|---|
| First post | 2017-07-21 13:10 +0200 |
| Last post | 2017-07-24 12:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes Manu Gautam <mgautam@codeaurora.org> - 2017-07-21 13:10 +0200
Re: [PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes Stephen Boyd <sboyd@codeaurora.org> - 2017-07-21 19:20 +0200
Re: [PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes Manu Gautam <mgautam@codeaurora.org> - 2017-07-24 12:10 +0200
| From | Manu Gautam <mgautam@codeaurora.org> |
|---|---|
| Date | 2017-07-21 13:10 +0200 |
| Subject | [PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes |
| Message-ID | <u5DYJ-45z-1@gated-at.bofh.it> |
Driver currently notifies only USB3 PHY for mode change.
Extend this to USB3 PHY so that driver based on the mode
can release system resources - clocks, regulators etc.
and can even turn off PHY during runtime suspend.
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 326b302..1f6c51e 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -156,9 +156,8 @@ static void __dwc3_set_mode(struct work_struct *work)
} else {
if (dwc->usb2_phy)
otg_set_vbus(dwc->usb2_phy->otg, true);
- if (dwc->usb2_generic_phy)
- phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST);
-
+ phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST);
+ phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_HOST);
}
break;
case DWC3_GCTL_PRTCAP_DEVICE:
@@ -166,8 +165,8 @@ static void __dwc3_set_mode(struct work_struct *work)
if (dwc->usb2_phy)
otg_set_vbus(dwc->usb2_phy->otg, false);
- if (dwc->usb2_generic_phy)
- phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_DEVICE);
+ phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_DEVICE);
+ phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_DEVICE);
ret = dwc3_gadget_init(dwc);
if (ret)
@@ -931,8 +930,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)
if (dwc->usb2_phy)
otg_set_vbus(dwc->usb2_phy->otg, false);
- if (dwc->usb2_generic_phy)
- phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_DEVICE);
+ phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_DEVICE);
+ phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_DEVICE);
ret = dwc3_gadget_init(dwc);
if (ret) {
@@ -946,8 +945,8 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)
if (dwc->usb2_phy)
otg_set_vbus(dwc->usb2_phy->otg, true);
- if (dwc->usb2_generic_phy)
- phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST);
+ phy_set_mode(dwc->usb2_generic_phy, PHY_MODE_USB_HOST);
+ phy_set_mode(dwc->usb3_generic_phy, PHY_MODE_USB_HOST);
ret = dwc3_host_init(dwc);
if (ret) {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
[toc] | [next] | [standalone]
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Date | 2017-07-21 19:20 +0200 |
| Subject | Re: [PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes |
| Message-ID | <u5JKN-7DO-11@gated-at.bofh.it> |
| In reply to | #1693595 |
On 07/21/2017 04:02 AM, Manu Gautam wrote: > Driver currently notifies only USB3 PHY for mode change. > Extend this to USB3 PHY so that driver based on the mode > can release system resources - clocks, regulators etc. > and can even turn off PHY during runtime suspend. > > Signed-off-by: Manu Gautam <mgautam@codeaurora.org> This patch is confusing because you say "notify for usb3 phy", but then combine a change to remove the NULL pointer check on phy_set_mode() for the usb2 phy. Please describe everything that's happening in a patch in the commit text. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
[toc] | [prev] | [next] | [standalone]
| From | Manu Gautam <mgautam@codeaurora.org> |
|---|---|
| Date | 2017-07-24 12:10 +0200 |
| Subject | Re: [PATCH v1 6/6] usb: dwc3: core: Notify USB3 PHY as well for DRD modes |
| Message-ID | <u6Itj-3l5-17@gated-at.bofh.it> |
| In reply to | #1693876 |
On 7/21/2017 10:39 PM, Stephen Boyd wrote: > On 07/21/2017 04:02 AM, Manu Gautam wrote: >> Driver currently notifies only USB3 PHY for mode change. >> Extend this to USB3 PHY so that driver based on the mode >> can release system resources - clocks, regulators etc. >> and can even turn off PHY during runtime suspend. >> >> Signed-off-by: Manu Gautam <mgautam@codeaurora.org> > This patch is confusing because you say "notify for usb3 phy", but then > combine a change to remove the NULL pointer check on phy_set_mode() for > the usb2 phy. Please describe everything that's happening in a patch in > the commit text. Sure, will add a comment for that. It was done to align with other phy_ops usage in the driver. Also, these wrapper functions already have a NULL pointer check.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web