usb: bdc: hook a quick Device Tree compatible string
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 19 Jul 2017 19:11:44 +0000 (15:11 -0400)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 Aug 2017 11:18:58 +0000 (14:18 +0300)
Allows Device Tree probing

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/bdc/bdc.h
drivers/usb/gadget/udc/bdc/bdc_core.c

index 3664808..f657a4e 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/usb/gadget.h>
 #include <asm/unaligned.h>
 
-#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)
 
index c2bfae2..bc0729b 100644 (file)
@@ -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,