Re: [PATCH] pwm: atmel: enable clk when pwm already enabled in bootloader

From
Uwe Kleine-König <hidden>
Date
2023-07-10 19:16:09
Also in
linux-pwm, lkml
Reply to
Thierry Reding, 2023-07-10
Hello,

On Mon, Jul 10, 2023 at 05:00:45PM +0200, Thierry Reding wrote:
On Mon, Jul 10, 2023 at 10:42:14PM +0800, Guiting Shen wrote:
quoted
+		err = clk_enable(atmel_pwm->clk);
+		if (err) {
+			dev_err(atmel_pwm->chip.dev, "enable clock error\n");
Might be worth to include the error code in the error message to make it
easier to diagnose where the issue is. Something like:

	dev_err(atmel_pwm->chip.dev, "failed to enable clock: %d\n", err);
Or (IMHO) still better:

 	dev_err(atmel_pwm->chip.dev, "failed to enable clock: %pe\n", ERR_PTR(err));

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
Thread (7 messages) 7 messages, 3 authors, last reply 2023-07-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help