Skip to content
Commit 4a627b52 authored by Clemens Gruber's avatar Clemens Gruber Committed by Thierry Reding
Browse files

pwm-pca9685: Fix several driver bugs



Problems:
- When duty_ns == period_ns, the full OFF bit was not cleared and the
  PWM output of the PCA9685 stayed off.
- When duty_ns == period_ns and the catch-all channel was used, the
  ALL_LED_OFF_L register was not cleared.
- The full ON bit was not cleared when setting the OFF time, therefore
  the exact OFF time was ignored when setting a duty_ns < period_ns

Solution: Clear both OFF registers when setting full ON and clear the
full ON bit when changing the OFF registers.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: default avatarClemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent fe0aea79
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment