linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY
@ 2014-07-08 10:14 Markus Pargmann
  2014-07-08 10:14 ` [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required Markus Pargmann
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Pargmann @ 2014-07-08 10:14 UTC (permalink / raw)
  To: linux-arm-kernel

-ENODEV is interpreted by the generic driver probing function as a
non-matching driver. This leads to a missing probe failure message.

Also a missing USB PHY is more of an invalid configuration of the usb
driver because it is necessary.

This patch returns -EINVAL if devm_usb_get_phy_by_phandle() returned -ENODEV.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 drivers/usb/chipidea/ci_hdrc_imx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 2e58f8dfd311..65444b02bd68 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -133,6 +133,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
 	data->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "fsl,usbphy", 0);
 	if (IS_ERR(data->phy)) {
 		ret = PTR_ERR(data->phy);
+		/* Return -EINVAL if no usbphy is available */
+		if (ret == -ENODEV)
+			ret = -EINVAL;
 		goto err_clk;
 	}
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required
  2014-07-08 10:14 [PATCH 1/2] usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY Markus Pargmann
@ 2014-07-08 10:14 ` Markus Pargmann
  2014-07-08 16:28   ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Pargmann @ 2014-07-08 10:14 UTC (permalink / raw)
  To: linux-arm-kernel

fsl,usbphy is no optional property. This patch moves it to the list of
required properties.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
index a6a32cb7f777..8014d0d050f8 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
@@ -4,6 +4,7 @@ Required properties:
 - compatible: Should be "fsl,imx27-usb"
 - reg: Should contain registers location and length
 - interrupts: Should contain controller interrupt
+- fsl,usbphy: phandler of usb phy that connects to the only one port
 
 Recommended properies:
 - phy_type: the type of the phy connected to the core. Should be one
@@ -12,7 +13,6 @@ Recommended properies:
 - dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
 
 Optional properties:
-- fsl,usbphy: phandler of usb phy that connects to the only one port
 - fsl,usbmisc: phandler of non-core register device, with one argument
   that indicate usb controller index
 - vbus-supply: regulator for vbus
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required
  2014-07-08 10:14 ` [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required Markus Pargmann
@ 2014-07-08 16:28   ` Sergei Shtylyov
  2014-07-09  7:26     ` Markus Pargmann
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2014-07-08 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 07/08/2014 02:14 PM, Markus Pargmann wrote:

> fsl,usbphy is no optional property. This patch moves it to the list of
> required properties.

> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> ---
>   Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
> index a6a32cb7f777..8014d0d050f8 100644
> --- a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
> +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
> @@ -4,6 +4,7 @@ Required properties:
>   - compatible: Should be "fsl,imx27-usb"
>   - reg: Should contain registers location and length
>   - interrupts: Should contain controller interrupt
> +- fsl,usbphy: phandler of usb phy that connects to the only one port

    s/phandler/phandle/. Can fix, while at it...


> @@ -12,7 +13,6 @@ Recommended properies:
>   - dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
>
>   Optional properties:
> -- fsl,usbphy: phandler of usb phy that connects to the only one port
>   - fsl,usbmisc: phandler of non-core register device, with one argument
>     that indicate usb controller index
>   - vbus-supply: regulator for vbus

WBR, Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required
  2014-07-08 16:28   ` Sergei Shtylyov
@ 2014-07-09  7:26     ` Markus Pargmann
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Pargmann @ 2014-07-09  7:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Tue, Jul 08, 2014 at 08:28:59PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 07/08/2014 02:14 PM, Markus Pargmann wrote:
> 
> >fsl,usbphy is no optional property. This patch moves it to the list of
> >required properties.
> 
> >Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> >---
> >  Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> >diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
> >index a6a32cb7f777..8014d0d050f8 100644
> >--- a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
> >+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
> >@@ -4,6 +4,7 @@ Required properties:
> >  - compatible: Should be "fsl,imx27-usb"
> >  - reg: Should contain registers location and length
> >  - interrupts: Should contain controller interrupt
> >+- fsl,usbphy: phandler of usb phy that connects to the only one port
> 
>    s/phandler/phandle/. Can fix, while at it...

Yes, right, I will fix it and resend.

Thanks,

Markus

-- 
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 |
-------------- 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/20140709/27181e9e/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-09  7:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08 10:14 [PATCH 1/2] usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY Markus Pargmann
2014-07-08 10:14 ` [PATCH 2/2] usb: ci_hdrc_imx doc: fsl,usbphy is required Markus Pargmann
2014-07-08 16:28   ` Sergei Shtylyov
2014-07-09  7:26     ` Markus Pargmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).