[2/2] pwm: rcar: Document inability to set duty_cycle = 0
diff mbox series

Message ID 20191024071410.30620-2-u.kleine-koenig@pengutronix.de
State New
Headers show
Series
  • Untitled series #138265
Related show

Commit Message

Uwe Kleine-König Oct. 24, 2019, 7:14 a.m. UTC
When .apply is called with state->duty_cycle = 0 the duty_ns parameter
to rcar_pwm_set_counter() is 0 which results in ph being 0 and
rcar_pwm_set_counter() returning -EINVAL.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-rcar.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Yoshihiro Shimoda Oct. 24, 2019, 7:20 a.m. UTC | #1
Hi Uwe,

> From: Uwe Kleine-Konig, Sent: Thursday, October 24, 2019 4:14 PM
> 
> When .apply is called with state->duty_cycle = 0 the duty_ns parameter
> to rcar_pwm_set_counter() is 0 which results in ph being 0 and
> rcar_pwm_set_counter() returning -EINVAL.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Best regards,
Yoshihiro Shimoda

Patch
diff mbox series

diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c
index 6fac8eb98d54..2685577b6dd4 100644
--- a/drivers/pwm/pwm-rcar.c
+++ b/drivers/pwm/pwm-rcar.c
@@ -3,6 +3,9 @@ 
  * R-Car PWM Timer driver
  *
  * Copyright (C) 2015 Renesas Electronics Corporation
+ *
+ * Limitations:
+ * - The hardware cannot generate a 0% duty cycle.
  */
 
 #include <linux/clk.h>