From 8ac1685bf911f70aea6de67b3db5674c3ea112f1 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 19 Jul 2017 15:11:44 -0400 Subject: [PATCH] usb: bdc: hook a quick Device Tree compatible string Allows Device Tree probing Signed-off-by: Florian Fainelli Signed-off-by: Al Cooper Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/bdc/bdc.h | 4 ++-- drivers/usb/gadget/udc/bdc/bdc_core.c | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers/usb/gadget/udc/bdc/bdc.h index 36648087b54a..f657a4e81d05 100644 --- a/drivers/usb/gadget/udc/bdc/bdc.h +++ b/drivers/usb/gadget/udc/bdc/bdc.h @@ -27,8 +27,8 @@ #include #include -#define BRCM_BDC_NAME "bdc_usb3" -#define BRCM_BDC_DESC "BDC device controller driver" +#define BRCM_BDC_NAME "bdc" +#define BRCM_BDC_DESC "Broadcom USB Device Controller driver" #define DMA_ADDR_INVALID (~(dma_addr_t)0) diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index c2bfae2347c3..bc0729b84948 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_core.c +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c @@ -533,9 +533,17 @@ static int bdc_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id bdc_of_match[] = { + { .compatible = "brcm,bdc-v0.16" }, + { .compatible = "brcm,bdc" }, + { /* sentinel */ } +}; + static struct platform_driver bdc_driver = { .driver = { .name = BRCM_BDC_NAME, + .owner = THIS_MODULE, + .of_match_table = bdc_of_match, }, .probe = bdc_probe, .remove = bdc_remove, -- 2.20.1