Skip to content

Commit ad70f93

Browse files
xdarklightgregkh
authored andcommitted
usb: core: hcd: remove support for initializing a single PHY
With the new PHY wrapper in place we can now handle multiple PHYs. Remove the code which handles only one generic PHY as this is now covered (with support for multiple PHYs as well as suspend/resume support) by the new PHY wrapper. Signed-off-by: Martin Blumenstingl <[email protected]> Tested-by: Neil Armstrong <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1255dfd commit ad70f93

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

drivers/usb/core/hcd.c

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,30 +2757,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
27572757
}
27582758
}
27592759

2760-
if (IS_ENABLED(CONFIG_GENERIC_PHY) && !hcd->skip_phy_initialization) {
2761-
struct phy *phy = phy_get(hcd->self.sysdev, "usb");
2762-
2763-
if (IS_ERR(phy)) {
2764-
retval = PTR_ERR(phy);
2765-
if (retval == -EPROBE_DEFER)
2766-
goto err_phy;
2767-
} else {
2768-
retval = phy_init(phy);
2769-
if (retval) {
2770-
phy_put(phy);
2771-
goto err_phy;
2772-
}
2773-
retval = phy_power_on(phy);
2774-
if (retval) {
2775-
phy_exit(phy);
2776-
phy_put(phy);
2777-
goto err_phy;
2778-
}
2779-
hcd->phy = phy;
2780-
hcd->remove_phy = 1;
2781-
}
2782-
}
2783-
27842760
if (!hcd->skip_phy_initialization) {
27852761
hcd->phy_roothub = usb_phy_roothub_init(hcd->self.sysdev);
27862762
if (IS_ERR(hcd->phy_roothub)) {
@@ -2961,13 +2937,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
29612937
err_usb_phy_roothub_power_on:
29622938
usb_phy_roothub_exit(hcd->phy_roothub);
29632939
err_phy_roothub_init:
2964-
if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) {
2965-
phy_power_off(hcd->phy);
2966-
phy_exit(hcd->phy);
2967-
phy_put(hcd->phy);
2968-
hcd->phy = NULL;
2969-
}
2970-
err_phy:
29712940
if (hcd->remove_phy && hcd->usb_phy) {
29722941
usb_phy_shutdown(hcd->usb_phy);
29732942
usb_put_phy(hcd->usb_phy);
@@ -3048,12 +3017,6 @@ void usb_remove_hcd(struct usb_hcd *hcd)
30483017
usb_phy_roothub_power_off(hcd->phy_roothub);
30493018
usb_phy_roothub_exit(hcd->phy_roothub);
30503019

3051-
if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) {
3052-
phy_power_off(hcd->phy);
3053-
phy_exit(hcd->phy);
3054-
phy_put(hcd->phy);
3055-
hcd->phy = NULL;
3056-
}
30573020
if (hcd->remove_phy && hcd->usb_phy) {
30583021
usb_phy_shutdown(hcd->usb_phy);
30593022
usb_put_phy(hcd->usb_phy);

include/linux/usb/hcd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ struct usb_hcd {
103103
* other external phys should be software-transparent
104104
*/
105105
struct usb_phy *usb_phy;
106-
struct phy *phy;
107106
struct usb_phy_roothub *phy_roothub;
108107

109108
/* Flags that need to be manipulated atomically because they can

0 commit comments

Comments
 (0)