Skip to content

Commit 488c9cd

Browse files
Anton Tikhomirovgregkh
authored andcommitted
USB: phy: samsung: Support multiple PHYs of same type
This patch removes limitation when only one PHY of specific type could be used. Signed-off-by: Anton Tikhomirov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f74b75e commit 488c9cd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/usb/phy/phy-samsung-usb2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
411411
sphy->drv_data = drv_data;
412412
sphy->phy.dev = sphy->dev;
413413
sphy->phy.label = "samsung-usb2phy";
414+
sphy->phy.type = USB_PHY_TYPE_USB2;
414415
sphy->phy.init = samsung_usb2phy_init;
415416
sphy->phy.shutdown = samsung_usb2phy_shutdown;
416417

@@ -426,7 +427,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
426427

427428
platform_set_drvdata(pdev, sphy);
428429

429-
return usb_add_phy(&sphy->phy, USB_PHY_TYPE_USB2);
430+
return usb_add_phy_dev(&sphy->phy);
430431
}
431432

432433
static int samsung_usb2phy_remove(struct platform_device *pdev)

drivers/usb/phy/phy-samsung-usb3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ static int samsung_usb3phy_probe(struct platform_device *pdev)
271271
sphy->clk = clk;
272272
sphy->phy.dev = sphy->dev;
273273
sphy->phy.label = "samsung-usb3phy";
274+
sphy->phy.type = USB_PHY_TYPE_USB3;
274275
sphy->phy.init = samsung_usb3phy_init;
275276
sphy->phy.shutdown = samsung_usb3phy_shutdown;
276277
sphy->drv_data = samsung_usbphy_get_driver_data(pdev);
@@ -283,7 +284,7 @@ static int samsung_usb3phy_probe(struct platform_device *pdev)
283284

284285
platform_set_drvdata(pdev, sphy);
285286

286-
return usb_add_phy(&sphy->phy, USB_PHY_TYPE_USB3);
287+
return usb_add_phy_dev(&sphy->phy);
287288
}
288289

289290
static int samsung_usb3phy_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)