diff mbox series

[2/6] usb: chipidea: Use usb2 phy for Zynq platform

Message ID 1629825378-8089-3-git-send-email-manish.narani@xilinx.com
State New
Headers show
Series Chipidea USB driver Enhancements and Bug Fixes | expand

Commit Message

Manish Narani Aug. 24, 2021, 5:16 p.m. UTC
Add usb2 phy to Zynq platform data.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Manish Narani <manish.narani@xilinx.com>
---
 drivers/usb/chipidea/ci_hdrc_usb2.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Peter Chen Oct. 7, 2021, 4:52 a.m. UTC | #1
On 21-08-24 22:46:14, Manish Narani wrote:
> Add usb2 phy to Zynq platform data.


Please change the subject and comments a little. This file is not only
for xilinx platform, it is for generic chipidea driver. If you would
like this change only for your platform, you may use of_device_id.data
for condition.

Peter

> 

> Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>

> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

> Signed-off-by: Manish Narani <manish.narani@xilinx.com>

> ---

>  drivers/usb/chipidea/ci_hdrc_usb2.c | 4 ++++

>  1 file changed, 4 insertions(+)

> 

> diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c

> index dc86b12..be58869 100644

> --- a/drivers/usb/chipidea/ci_hdrc_usb2.c

> +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c

> @@ -65,6 +65,10 @@ static int ci_hdrc_usb2_probe(struct platform_device *pdev)

>  	if (match && match->data) {

>  		/* struct copy */

>  		*ci_pdata = *(struct ci_hdrc_platform_data *)match->data;

> +		ci_pdata->usb_phy = devm_usb_get_phy_by_phandle(dev, "usb-phy",

> +								0);

> +		if (IS_ERR(ci_pdata->usb_phy))

> +			return PTR_ERR(ci_pdata->usb_phy);

>  	}

>  

>  	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);

> -- 

> 2.1.1

> 


-- 

Thanks,
Peter Chen
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c
index dc86b12..be58869 100644
--- a/drivers/usb/chipidea/ci_hdrc_usb2.c
+++ b/drivers/usb/chipidea/ci_hdrc_usb2.c
@@ -65,6 +65,10 @@  static int ci_hdrc_usb2_probe(struct platform_device *pdev)
 	if (match && match->data) {
 		/* struct copy */
 		*ci_pdata = *(struct ci_hdrc_platform_data *)match->data;
+		ci_pdata->usb_phy = devm_usb_get_phy_by_phandle(dev, "usb-phy",
+								0);
+		if (IS_ERR(ci_pdata->usb_phy))
+			return PTR_ERR(ci_pdata->usb_phy);
 	}
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);