[PATCH 3/4] pwm: atmel: look up the clock without a name

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Nov 6 03:13:49 PST 2026


From: Ahmad Fatoum <a.fatoum at barebox.org>

The SAMA5D2, SAMA5D3 and SAMA5D4 device trees don't name the PWM clock,
so probe fails with -ENOENT on these SoCs. Linux requests the clock
without a name, so let's do the same. at91sam9263.dtsi has only the one
clock, so it keeps working.

Fixes: 3b4a22e803bb ("pwm: add pwm-atmel from Linux kernel 4.14")
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 drivers/pwm/pwm-atmel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index a847d4d434e3..35299cbc563a 100644
--- a/drivers/pwm/pwm-atmel.c
+++ b/drivers/pwm/pwm-atmel.c
@@ -432,7 +432,7 @@ static int atmel_pwm_probe(struct device *dev)
 	atmel_pwm = xzalloc(sizeof(*atmel_pwm));
 	atmel_pwm->data = data;
 	atmel_pwm->dev = dev;
-	atmel_pwm->clk = clk_get(dev, "pwm_clk");
+	atmel_pwm->clk = clk_get(dev, NULL);
 	if (IS_ERR(atmel_pwm->clk))
 		return PTR_ERR(atmel_pwm->clk);
 
-- 
2.47.3




More information about the barebox mailing list