lkml.org 
[lkml]   [2016]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC v2 11/13] usb: port: Parse pwrseq phandle from Device Tree
From
Date
Hello Krzysztof,

On 05/05/2016 08:34 AM, Krzysztof Kozlowski wrote:
> Parse usb-pwrseq property from Device Tree to get the phandle to pwrseq
> device. The pwrseq device will be used by USB hub to cycle the power
> before activating ports.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---

[snip]

>
> @@ -532,6 +534,14 @@ int usb_hub_create_port_device(struct usb_hub *hub, int port1)
> return retval;
> }
>
> + port_dev->dev.of_node = usb_of_get_child_node(hub->hdev->dev.of_node, port1);
> + port_dev->pwrseq = pwrseq_alloc(&port_dev->dev);
> + if (IS_ERR(port_dev->pwrseq)) {
> + device_unregister(&port_dev->dev);
> + /* TODO: what about EPROBE_DEFER? */

I think it's OK since the call chain is:

hub_probe()
hub_configure()
usb_hub_create_port_device()

so the hub_probe() will be deferred if the usb-pwrseq was not registered yet.
Unless I misunderstood your question :)

Anyway, patch looks good to me:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America

\
 
 \ /
  Last update: 2016-05-05 22:21    [W:0.288 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site