USB chipidea i.MX: use framework phy handling
Sascha Hauer
maintainerPATCH 1/1 USB chipidea i.MX: use framework phy handling
This series switches the mxs phy and the i.MX chipidea support from homegrew phy support to use usb_add_phy_dev/devm_usb_get_phy_by_phandle.
Based on
[PATCH v2] Add USB of helpers and use them in the chipidea driver
But I think this could also be applied separately if necessary.
Sascha
----------------------------------------------------------------
Sascha Hauer (2):
USB mxs-phy: Register phy with framework
USB chipidea i.MX: use devm_usb_get_phy_by_phandle to get phy
drivers/usb/chipidea/ci13xxx_imx.c | 31 ++++++++++--------------------- drivers/usb/otg/mxs-phy.c | 9 +++++++++ 2 files changed, 19 insertions(+), 21 deletions(-)
Sascha Hauer
maintainerPATCH 1/2 USB mxs-phy: Register phy with framework
We now have usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.
--- drivers/usb/otg/mxs-phy.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/usb/otg/mxs-phy.c +9 -0
@@ -127,6 +127,7 @@ static int mxs_phy_probe(struct platform_device *pdev)void __iomem *base;struct clk *clk;struct mxs_phy *mxs_phy; +int ret; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {
@@ -166,11 +167,19 @@ static int mxs_phy_probe(struct platform_device *pdev)platform_set_drvdata (pdev, &mxs_phy->phy); + ret =usb_add_phy_dev (&mxs_phy->phy); +if (ret) +return ret; +return 0 ; }static int mxs_phy_remove (struct platform_device *pdev) { +struct mxs_phy *mxs_phy =platform_get_drvdata (pdev); + +usb_remove_phy (&mxs_phy->phy); +platform_set_drvdata (pdev,NULL );return 0 ;
Signature · 1 line
1.7.10.4
PATCH 1/2 USB mxs-phy: Register phy with framework
Quoted 4 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>
Quoted 37 lines
--- drivers/usb/otg/mxs-phy.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/usb/otg/mxs-phy.c +9
-0@@ -127,6 +127,7 @@ static int mxs_phy_probe(struct platform_device *pdev)void __iomem *base;struct clk *clk;struct mxs_phy *mxs_phy; +int ret; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {@@ -166,11 +167,19 @@ static int mxs_phy_probe(struct platform_device *pdev)platform_set_drvdata (pdev, &mxs_phy->phy); + ret =usb_add_phy_dev (&mxs_phy->phy); +if (ret) +return ret; +return 0 ; }static int mxs_phy_remove (struct platform_device *pdev) { +struct mxs_phy *mxs_phy =platform_get_drvdata (pdev); + +usb_remove_phy (&mxs_phy->phy); +platform_set_drvdata (pdev,NULL );return 0 ;
PATCH 1/2 USB mxs-phy: Register phy with framework
In reply to Sascha HauerQuoted 30 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>--- drivers/usb/otg/mxs-phy.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/usb/otg/mxs-phy.c +5
-0@@ -127,6 +127,7 @@ static int mxs_phy_probe(struct platform_device *pdev)void __iomem *base;struct clk *clk;struct mxs_phy *mxs_phy; +int ret; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {@@ -166,11 +167,19 @@ static int mxs_phy_probe(struct platform_device *pdev)platform_set_drvdata (pdev, &mxs_phy->phy); + ret =usb_add_phy_dev (&mxs_phy->phy); +if (ret) +return ret; +return 0 ; }
drivers/usb/otg/mxs-phy.c static int mxs_phy_probe(struct platform_device *pdev) · line 185
Quoted 10 lines
drivers/usb/otg/mxs-phy.c +4
-0static int mxs_phy_remove (struct platform_device *pdev) { +struct mxs_phy *mxs_phy =platform_get_drvdata (pdev); + +usb_remove_phy (&mxs_phy->phy); +platform_set_drvdata (pdev,NULL );return 0 ;
Signature · 2 lines
Best Regards, Peter Chen
PATCH 1/2 USB mxs-phy: Register phy with framework
In reply to Sascha HauerHi,
Quoted 4 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>
Sascha, are you taking this through your tree or you want me to queue it up ?
If you want to take it:
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130214/3b0a8117/attachment.sig>
Sascha Hauer
maintainerPATCH 1/2 USB mxs-phy: Register phy with framework
Quoted 10 lines · Felipe Balbi
Hi,
Quoted 4 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>Sascha, are you taking this through your tree or you want me to queue it up ?
I would prefer if either you could take it or Alexander Shishkin along with the other patches in:
[PATCH v4] USB: add devicetree helpers for determining dr_mode and phy_type
Could you have a look at them? Alexander is asking for an ack for 1/9, 2/9, 3/9, 8/9. I just realized you are not on Cc for these. I could bounce you the patches in case you don't have them in your mailbox.
Thanks
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/2 USB mxs-phy: Register phy with framework
Hi,
Quoted 12 lines · Sascha Hauer
Quoted 10 lines · Felipe Balbi
Hi,
Quoted 4 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>Sascha, are you taking this through your tree or you want me to queue it up ?
Quoted 8 lines
I would prefer if either you could take it or Alexander Shishkin along with the other patches in:
[PATCH v4] USB: add devicetree helpers for determining
dr_modeandphy_typeCould you have a look at them? Alexander is asking for an ack for 1/9, 2/9, 3/9, 8/9. I just realized you are not on Cc for these. I could bounce you the patches in case you don't have them in your mailbox.
Ok, I'll look at them, no need to bounce. You _do_ realize, however, that Greg has already closed all his trees for v3.9, right ? So anything from now on will be queued for v3.10.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130214/4b0d1f36/attachment.sig>
Sascha Hauer
maintainerPATCH 1/2 USB mxs-phy: Register phy with framework
Quoted 20 lines · Felipe Balbi
Hi,
Quoted 17 lines · Sascha Hauer
Quoted 10 lines · Felipe Balbi
Hi,
Quoted 4 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>Sascha, are you taking this through your tree or you want me to queue it up ?
I would prefer if either you could take it or Alexander Shishkin along with the other patches in:
[PATCH v4] USB: add devicetree helpers for determining
dr_modeandphy_type
Quoted 7 lines
Quoted 3 lines
Could you have a look at them? Alexander is asking for an ack for 1/9, 2/9, 3/9, 8/9. I just realized you are not on Cc for these. I could bounce you the patches in case you don't have them in your mailbox.
Ok, I'll look at them, no need to bounce. You _do_ realize, however, that Greg has already closed all his trees for v3.9, right ? So anything from now on will be queued for v3.10.
I'm fine with that. I'm just a bit insistent because the chipidea patches are floating around for half a year now. Once I have the warm feeling that the patches are handled I have time ;)
Thanks
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/2 USB mxs-phy: Register phy with framework
Quoted 25 lines · Sascha Hauer
Quoted 24 lines · Felipe Balbi
Hi,
Quoted 20 lines · Sascha Hauer
Quoted 10 lines · Felipe Balbi
Hi,
Quoted 4 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>Sascha, are you taking this through your tree or you want me to queue it up ?
I would prefer if either you could take it or Alexander Shishkin along with the other patches in:
[PATCH v4] USB: add devicetree helpers for determining
dr_modeandphy_typeCould you have a look at them? Alexander is asking for an ack for 1/9, 2/9, 3/9, 8/9. I just realized you are not on Cc for these. I could bounce you the patches in case you don't have them in your mailbox.
Quoted 7 lines
Quoted 3 lines
Ok, I'll look at them, no need to bounce. You _do_ realize, however, that Greg has already closed all his trees for v3.9, right ? So anything from now on will be queued for v3.10.
I'm fine with that. I'm just a bit insistent because the chipidea patches are floating around for half a year now. Once I have the warm feeling that the patches are handled I have time ;)
I'm getting ready to queue patches but, when looking at this thread, it seems like another version should've been sent. I'll skip this and look at the other chipidea threads,
cheers
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130227/7fbb38c0/attachment.sig>
PATCH 1/2 USB mxs-phy: Register phy with framework
Quoted 30 lines · Felipe Balbi
Quoted 29 lines · Sascha Hauer
Quoted 27 lines · Felipe Balbi
Hi,
Quoted 12 lines · Sascha Hauer
Quoted 10 lines · Felipe Balbi
Hi,
Quoted 4 lines · Sascha Hauer
We now have
usb_add_phy_dev(), so use it to register with the framework to be able to find the phy from the USB driver.Signed-off-by Sascha Hauer <[email protected]>Sascha, are you taking this through your tree or you want me to queue it up ?
Quoted 8 lines
I would prefer if either you could take it or Alexander Shishkin along with the other patches in:
[PATCH v4] USB: add devicetree helpers for determining
dr_modeandphy_typeCould you have a look at them? Alexander is asking for an ack for 1/9, 2/9, 3/9, 8/9. I just realized you are not on Cc for these. I could bounce you the patches in case you don't have them in your mailbox.
Ok, I'll look at them, no need to bounce. You _do_ realize, however, that Greg has already closed all his trees for v3.9, right ? So anything from now on will be queued for v3.10.
Quoted 7 lines
Quoted 3 lines
I'm fine with that. I'm just a bit insistent because the chipidea patches are floating around for half a year now. Once I have the warm feeling that the patches are handled I have time ;)
I'm getting ready to queue patches but, when looking at this thread, it seems like another version should've been sent. I'll skip this and look at the other chipidea threads,
I'm currently rebasing Saschas patches to Greg's usb-net.
Marc
---
Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130227/2b8b8b74/attachment.sig>
Sascha Hauer
maintainerPATCH 2/2 USB chipidea i.MX: use devm_usb_get_phy_by_phandle to get phy
In reply to Sascha Hauer--- drivers/usb/chipidea/ci13xxx_imx.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-)
drivers/usb/chipidea/ci13xxx_imx.c +10 -21
@@ -30,7 +30,6 @@ ((struct usb_phy *)platform_get_drvdata(pdev))struct ci13xxx_imx_data { -struct device_node *phy_np;struct usb_phy *phy;struct platform_device *ci_pdev;struct clk *clk;
@@ -90,12 +89,12 @@ static int ci13xxx_imx_probe(struct platform_device *pdev) {struct ci13xxx_imx_data *data;struct ci13xxx_platform_data *pdata; -struct platform_device *plat_ci, *phy_pdev; -struct device_node *phy_np; +struct platform_device *plat_ci;struct resource *res;struct regulator *reg_vbus;struct pinctrl *pinctrl;int ret; +struct usb_phy *phy;if (of_find_property (pdev->dev.of_node,"fsl,usbmisc" ,NULL ) && !usbmisc_ops)
@@ -147,18 +146,12 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)return ret; } - phy_np =of_parse_phandle (pdev->dev.of_node,"fsl,usbphy" ,0 ); -if (phy_np) { - data->phy_np = phy_np; - phy_pdev =of_find_device_by_node (phy_np); -if (phy_pdev) { -struct usb_phy *phy; - phy =pdev_to_phy (phy_pdev); -if (phy && -try_module_get (phy_pdev->dev.driver->owner)) { -usb_phy_init (phy); - data->phy = phy; - } + phy =devm_usb_get_phy_by_phandle (&pdev->dev,"fsl,usbphy" ,0 ); +if (!IS_ERR (phy)) { + ret =usb_phy_init (phy); +if (ret) { +dev_err (&pdev->dev,"unable to init phy: %d\n" , ret); + goto err_clk; } }
@@ -170,7 +163,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)dev_err (&pdev->dev,"Failed to enable vbus regulator, err=%d\n" , ret); - goto put_np; + goto err_clk; } data->reg_vbus = reg_vbus; }else {
@@ -222,9 +215,7 @@ static int ci13xxx_imx_probe(struct platform_device *pdev) err:if (reg_vbus)regulator_disable (reg_vbus); -put_np: -if (phy_np) -of_node_put (phy_np); +err_clk:clk_disable_unprepare (data->clk);return ret; }
@@ -244,8 +235,6 @@ static int ci13xxx_imx_remove(struct platform_device *pdev)module_put (data->phy->dev->driver->owner); } -of_node_put (data->phy_np); -clk_disable_unprepare (data->clk);platform_set_drvdata (pdev,NULL );
Signature · 1 line
1.7.10.4
PATCH 2/2 USB chipidea i.MX: use devm_usb_get_phy_by_phandle to get phy
Hi,
Quoted 1 line · Sascha Hauer
Signed-off-by Sascha Hauer <[email protected]>
Some maintainers don't accept patches without a commit message.
Apart from that you can add,
Thanks
Kishon
PATCH 2/2 USB chipidea i.MX: use devm_usb_get_phy_by_phandle to get phy
Quoted 8 lines · kishon
Hi,
Quoted 1 line · Sascha Hauer
Signed-off-by Sascha Hauer <[email protected]>Some maintainers don't accept patches without a commit message.
Apart from that you can add,
Reviewed-by Kishon Vijay Abraham I <[email protected]>
Quoted 4 lines
Thanks
Kishon
Signature · 2 lines
Best Regards, Peter Chen
Sascha Hauer
maintainerPATCH 1/1 USB chipidea i.MX: use framework phy handling
In reply to Sascha HauerQuoted 8 lines · Sascha Hauer
This series switches the mxs phy and the i.MX chipidea support from homegrew phy support to use usb_add_phy_dev/devm_usb_get_phy_by_phandle.
Based on
[PATCH v2] Add USB of helpers and use them in the chipidea driver
But I think this could also be applied separately if necessary.
Kishon, Peter,
Thanks for reviewing these, but I'm afraid I must send another iteration for these. These patches do not handle -EPROBE_DEFER correctly.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/1 USB chipidea i.MX: use framework phy handling
Quoted 6 lines · Sascha Hauer
Quoted 5 lines · Sascha Hauer
This series switches the mxs phy and the i.MX chipidea support from homegrew phy support to use usb_add_phy_dev/devm_usb_get_phy_by_phandle.
Based on
Quoted 8 lines
Quoted 3 lines
[PATCH v2] Add USB of helpers and use them in the chipidea driver
But I think this could also be applied separately if necessary.
Kishon, Peter,
Thanks for reviewing these, but I'm afraid I must send another iteration for these. These patches do not handle -EPROBE_DEFER correctly.
which patch you have added handle -EPROBE_DEFER at v3?
Quoted 9 lines
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Signature · 2 lines
Best Regards, Peter Chen