]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: gadget: udc: atmel: handle at91sam9rl PMC
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 10 Sep 2018 20:12:49 +0000 (22:12 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 2 Oct 2018 07:33:34 +0000 (10:33 +0300)
The at91sam9rl PMC is not quite the same as the at91sam9g45 one and now has
its own compatible string. Add support for that.

Fixes: 217bace8e548 ("ARM: dts: fix PMC compatible")
Acked-by: Cristian Birsan <cristian.birsan@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/atmel_usba_udc.c

index 17147b8c771ef04024c2f203ee3636f9620d6f73..8f267be1745d82985c4185b1051e75b867812c4d 100644 (file)
@@ -2017,6 +2017,8 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 
        udc->errata = match->data;
        udc->pmc = syscon_regmap_lookup_by_compatible("atmel,at91sam9g45-pmc");
+       if (IS_ERR(udc->pmc))
+               udc->pmc = syscon_regmap_lookup_by_compatible("atmel,at91sam9rl-pmc");
        if (IS_ERR(udc->pmc))
                udc->pmc = syscon_regmap_lookup_by_compatible("atmel,at91sam9x5-pmc");
        if (udc->errata && IS_ERR(udc->pmc))