public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] leds: rgb: leds-qcom-lpg: PWM fixes
@ 2025-03-03 11:52 Abel Vesa
  2025-03-03 11:52 ` [PATCH v3 1/3] leds: rgb: leds-qcom-lpg: Fix pwm resolution max for normal PWMs Abel Vesa
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Abel Vesa @ 2025-03-03 11:52 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Anjelique Melendez
  Cc: Uwe Kleine-König, Kamal Wadhwa, Jishnu Prakash,
	Bjorn Andersson, Konrad Dybcio, Johan Hovold, Sebastian Reichel,
	Pavel Machek, linux-leds, linux-pwm, linux-arm-msm, linux-kernel,
	Abel Vesa, stable

The PWM allow configuring the PWM resolution from 8 bits PWM
values up to 15 bits values, for the Hi-Res PWMs, and then either
6-bit or 9-bit for the normal PWMs. The current implementation loops
through all possible resolutions (PWM sizes), for the PWM subtype, on top
of the already existing process of determining the prediv, exponent and
refclk.

The first and second issues are related to capping the computed PWM
value.

The third issue is that it uses the wrong maximum possible PWM
value for determining the best matched period.

Fix all of them.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
Changes in v3:
- Added a new patch that fixes the normal PWMs, since they now support
  6-bit resolution as well. Added it as first patch.
- Re-worded the second patch. Included Bjorn's suggestion and R-b tag.
- Link to v2: https://lore.kernel.org/r/20250226-leds-qcom-lpg-fix-max-pwm-on-hi-res-v2-0-7af5ef5d220b@linaro.org

Changes in v2:
- Re-worded the commit to drop the details that are not important
  w.r.t. what the patch is fixing.
- Added another patch which fixes the resolution used for determining
  best matched period and PWM config.
- Link to v1: https://lore.kernel.org/r/20250220-leds-qcom-lpg-fix-max-pwm-on-hi-res-v1-1-a161ec670ea5@linaro.org

---
Abel Vesa (3):
      leds: rgb: leds-qcom-lpg: Fix pwm resolution max for normal PWMs
      leds: rgb: leds-qcom-lpg: Fix pwm resolution max for Hi-Res PWMs
      leds: rgb: leds-qcom-lpg: Fix calculation of best period Hi-Res PWMs

 drivers/leds/rgb/leds-qcom-lpg.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
base-commit: cd3215bbcb9d4321def93fea6cfad4d5b42b9d1d
change-id: 20250220-leds-qcom-lpg-fix-max-pwm-on-hi-res-067e8782a79b

Best regards,
-- 
Abel Vesa <abel.vesa@linaro.org>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-04  8:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-03 11:52 [PATCH v3 0/3] leds: rgb: leds-qcom-lpg: PWM fixes Abel Vesa
2025-03-03 11:52 ` [PATCH v3 1/3] leds: rgb: leds-qcom-lpg: Fix pwm resolution max for normal PWMs Abel Vesa
2025-03-03 22:46   ` Sebastian Reichel
2025-03-03 11:52 ` [PATCH v3 2/3] leds: rgb: leds-qcom-lpg: Fix pwm resolution max for Hi-Res PWMs Abel Vesa
2025-03-03 22:46   ` Sebastian Reichel
2025-03-03 11:52 ` [PATCH v3 3/3] leds: rgb: leds-qcom-lpg: Fix calculation of best period " Abel Vesa
2025-03-03 22:47   ` Sebastian Reichel
2025-03-04  6:29 ` [PATCH v3 0/3] leds: rgb: leds-qcom-lpg: PWM fixes Uwe Kleine-König
2025-03-04  8:41   ` Abel Vesa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox