This makes it possible to instantiate the PXA25x UDC driver from the device tree. Cc: Robert Jarzmik <robert.jarzmik@xxxxxxx> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> --- drivers/usb/gadget/udc/pxa25x_udc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index d4be53559f2e..480828b76059 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -2529,6 +2529,16 @@ static int pxa25x_udc_resume(struct platform_device *dev) /*-------------------------------------------------------------------------*/ +static const struct of_device_id udc_of_match[] = { + { + .compatible = "intel,ixp4xx-udc", + }, + { + .compatible = "marvell,pxa25x-udc", + }, + {}, +}; + static struct platform_driver udc_driver = { .shutdown = pxa25x_udc_shutdown, .probe = pxa25x_udc_probe, @@ -2537,6 +2547,7 @@ static struct platform_driver udc_driver = { .resume = pxa25x_udc_resume, .driver = { .name = "pxa25x-udc", + .of_match_table = of_match_ptr(udc_of_match), }, }; -- 2.20.1