Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 882bd9fc authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Felipe Balbi
Browse files

usb: gadget: udc: atmel: Also get regmap for at91sam9x5-pmc



The "atmel,at91sam9g45-udc" compatible UDC is also used on at91sam9x5 so it
is also necessary to try to get the syscon for at91sam9x5-pmc.

Fixes: 4747639f ("usb: gadget: atmel: access the PMC using regmap")
Reported-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 837e9f00
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1920,6 +1920,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,at91sam9x5-pmc");
	if (udc->errata && IS_ERR(udc->pmc))
		return ERR_CAST(udc->pmc);