diff mbox series

pwm: twl-led: Document some limitations and link to the reference manual

Message ID 20220712084656.21043-1-u.kleine-koenig@pengutronix.de
State Accepted
Headers show
Series pwm: twl-led: Document some limitations and link to the reference manual | expand

Commit Message

Uwe Kleine-König July 12, 2022, 8:46 a.m. UTC
I found these just from reading the reference manual and the driver
source. It's unclear to me if there are glitches when updating the ON
and OFF registers.

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


base-commit: 394b517585da9fbb2eea2f2103ff47d37321e976

Comments

Thierry Reding July 28, 2022, 5:21 p.m. UTC | #1
On Tue, Jul 12, 2022 at 10:46:56AM +0200, Uwe Kleine-König wrote:
> I found these just from reading the reference manual and the driver
> source. It's unclear to me if there are glitches when updating the ON
> and OFF registers.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/pwm/pwm-twl-led.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

Applied, thanks.

Thierry
diff mbox series

Patch

diff --git a/drivers/pwm/pwm-twl-led.c b/drivers/pwm/pwm-twl-led.c
index ed0b63dd38f1..8fb84b441853 100644
--- a/drivers/pwm/pwm-twl-led.c
+++ b/drivers/pwm/pwm-twl-led.c
@@ -7,6 +7,22 @@ 
  *
  * This driver is a complete rewrite of the former pwm-twl6030.c authorded by:
  * Hemanth V <hemanthv@ti.com>
+ *
+ * Reference manual for the twl6030 is available at:
+ * https://www.ti.com/lit/ds/symlink/twl6030.pdf
+ *
+ * Limitations:
+ * - The twl6030 hardware only supports two period lengths (128 clock ticks and
+ *   64 clock ticks), the driver only uses 128 ticks
+ * - The hardware doesn't support ON = 0, so the active part of a period doesn't
+ *   start at its beginning.
+ * - The hardware could support inverted polarity (with a similar limitation as
+ *   for normal: the last clock tick is always inactive).
+ * - The hardware emits a constant low output when disabled.
+ * - A request for .duty_cycle = 0 results in an output wave with one active
+ *   clock tick per period. This should better use the disabled state.
+ * - The driver only implements setting the relative duty cycle.
+ * - The driver doesn't implement .get_state().
  */
 
 #include <linux/module.h>