On Mon, May 29, 2017 at 04:15:36PM +0200, Johan Hovold wrote: > On Mon, May 29, 2017 at 11:01:52AM +0200, Martin Fuzzey wrote: > > Hi Peter, > > > > I'm trying to create device tree nodes for USB devices (use case a USB > > device providing GPIO and I2C controllers) > > > > Your patch (now merged) > > 69bec725 "USB: core: let USB device know device node" > > > > looks just like what I need but I have a couple of problems. > > > > First it doesn't work at all on an i.MX53 because the actual struct > > device for the USB host controller is a "ci_hdrc" which is a child of > > the device having the DT node (ci_hdrc_imx) > > I believe you should set the new sysdev pointer to the parent controller > device, which has the device tree node. Take a look at a8c06e407ef9 > ("usb: separate out sysdev pointer from usb_bus"). > > > However my larger question is that I don't see how to associate a DT > > node with a USB *interface* rather than a USB *device*. > > I started looking into this a while back but got interrupted. I have > some preliminary code, mostly lacking associated documentation. > Johan has already supplied the correct answer and related code, if you would like see how USB device work based on DT, please check my power sequence patch set: http://www.spinics.net/lists/linux-usb/msg157134.html -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html