Skip to contentSkip to conversation

usb: gadget: udc: atmel: handle at91sam9rl PMC

PATCH Superseded Alexandre Belloni 2 participants 2 messages Sep 10, 2018 – Sep 14, 2018

Subsystems (3)
lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

PATCH 1/1 usb: gadget: udc: atmel: handle at91sam9rl PMC

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")
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/usb/gadget/udc/atmel_usba_udc.c +2 -0
index 17147b8c771e..8f267be1745d 100644
@@ -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))
Signature · 1 line
2.19.0.rc2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Alexandre Belloni

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")

It looks good to me.

Quoted 18 lines
---
  drivers/usb/gadget/udc/atmel_usba_udc.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/usb/gadget/udc/atmel_usba_udc.c +2 -0
index 17147b8c771e..8f267be1745d 100644
@@ -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))