OSDN Git Service

USB: musb: dsps: propagate device-tree node
authorJohan Hovold <johan@kernel.org>
Mon, 21 May 2018 13:42:20 +0000 (08:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 May 2018 10:03:25 +0000 (12:03 +0200)
To be able to use DSPS-based controllers with device-tree descriptions
of the USB topology, we need to associate the glue device's device-tree
node with the child controller device.

Note that this can also be used to eventually let USB core manage
generic phys.

Also note that the other glue drivers will require similar changes to be
able to describe their buses in DT.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_dsps.c

index 34e4dda..cfe6bfc 100644 (file)
@@ -765,6 +765,7 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue,
        musb->dev.parent                = dev;
        musb->dev.dma_mask              = &musb_dmamask;
        musb->dev.coherent_dma_mask     = musb_dmamask;
+       device_set_of_node_from_dev(&musb->dev, &parent->dev);
 
        glue->musb = musb;