Commit 488c9cd3 authored by Anton Tikhomirov's avatar Anton Tikhomirov Committed by Greg Kroah-Hartman

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: default avatarAnton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f74b75e7
...@@ -411,6 +411,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev) ...@@ -411,6 +411,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
sphy->drv_data = drv_data; sphy->drv_data = drv_data;
sphy->phy.dev = sphy->dev; sphy->phy.dev = sphy->dev;
sphy->phy.label = "samsung-usb2phy"; sphy->phy.label = "samsung-usb2phy";
sphy->phy.type = USB_PHY_TYPE_USB2;
sphy->phy.init = samsung_usb2phy_init; sphy->phy.init = samsung_usb2phy_init;
sphy->phy.shutdown = samsung_usb2phy_shutdown; sphy->phy.shutdown = samsung_usb2phy_shutdown;
...@@ -426,7 +427,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev) ...@@ -426,7 +427,7 @@ static int samsung_usb2phy_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sphy); platform_set_drvdata(pdev, sphy);
return usb_add_phy(&sphy->phy, USB_PHY_TYPE_USB2); return usb_add_phy_dev(&sphy->phy);
} }
static int samsung_usb2phy_remove(struct platform_device *pdev) static int samsung_usb2phy_remove(struct platform_device *pdev)
......
...@@ -271,6 +271,7 @@ static int samsung_usb3phy_probe(struct platform_device *pdev) ...@@ -271,6 +271,7 @@ static int samsung_usb3phy_probe(struct platform_device *pdev)
sphy->clk = clk; sphy->clk = clk;
sphy->phy.dev = sphy->dev; sphy->phy.dev = sphy->dev;
sphy->phy.label = "samsung-usb3phy"; sphy->phy.label = "samsung-usb3phy";
sphy->phy.type = USB_PHY_TYPE_USB3;
sphy->phy.init = samsung_usb3phy_init; sphy->phy.init = samsung_usb3phy_init;
sphy->phy.shutdown = samsung_usb3phy_shutdown; sphy->phy.shutdown = samsung_usb3phy_shutdown;
sphy->drv_data = samsung_usbphy_get_driver_data(pdev); sphy->drv_data = samsung_usbphy_get_driver_data(pdev);
...@@ -283,7 +284,7 @@ static int samsung_usb3phy_probe(struct platform_device *pdev) ...@@ -283,7 +284,7 @@ static int samsung_usb3phy_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sphy); platform_set_drvdata(pdev, sphy);
return usb_add_phy(&sphy->phy, USB_PHY_TYPE_USB3); return usb_add_phy_dev(&sphy->phy);
} }
static int samsung_usb3phy_remove(struct platform_device *pdev) static int samsung_usb3phy_remove(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment