projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dab8f9f
)
pwm: stm32: Fix error message to not describe the previous error path
author
Uwe Kleine-König
<u.kleine-koenig@baylibre.com>
Fri, 21 Jun 2024 14:37:14 +0000
(16:37 +0200)
committer
Uwe Kleine-König
<ukleinek@kernel.org>
Sat, 22 Jun 2024 14:13:19 +0000
(16:13 +0200)
"Failed to lock the clock" is an appropriate error message for
clk_rate_exclusive_get() failing, but not for the clock running too
fast for the driver's calculations.
Adapt the error message accordingly.
Fixes:
d44d635635a7
("pwm: stm32: Fix for settings using period > UINT32_MAX")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link:
https://lore.kernel.org/r/285182163211203fc823a65b180761f46e828dcb.1718979150.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/pwm-stm32.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-stm32.c
b/drivers/pwm/pwm-stm32.c
index
97d3de2
..
8bae3fd
100644
(file)
--- a/
drivers/pwm/pwm-stm32.c
+++ b/
drivers/pwm/pwm-stm32.c
@@
-681,7
+681,8
@@
static int stm32_pwm_probe(struct platform_device *pdev)
* .apply() won't overflow.
*/
if (clk_get_rate(priv->clk) > 1000000000)
- return dev_err_probe(dev, -EINVAL, "Failed to lock clock\n");
+ return dev_err_probe(dev, -EINVAL, "Clock freq too high (%lu)\n",
+ clk_get_rate(priv->clk));
chip->ops = &stm32pwm_ops;