From: Abel Vesa <abel.vesa@linaro.org>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Anjelique Melendez <anjelique.melendez@oss.qualcomm.com>
Cc: "Uwe Kleine-König" <ukleinek@kernel.org>,
"Kamal Wadhwa" <quic_kamalw@quicinc.com>,
"Jishnu Prakash" <jishnu.prakash@oss.qualcomm.com>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Johan Hovold" <johan@kernel.org>,
"Sebastian Reichel" <sre@kernel.org>,
"Pavel Machek" <pavel@ucw.cz>,
linux-leds@vger.kernel.org, linux-pwm@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
"Abel Vesa" <abel.vesa@linaro.org>,
stable@vger.kernel.org
Subject: [PATCH v4 0/3] leds: rgb: leds-qcom-lpg: PWM fixes
Date: Wed, 05 Mar 2025 15:09:03 +0200 [thread overview]
Message-ID: <20250305-leds-qcom-lpg-fix-max-pwm-on-hi-res-v4-0-bfe124a53a9f@linaro.org> (raw)
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 v4:
- Rebased on next-20250305
- Re-worded the commit messages for the first two patches to include an
example that should better explain what the issue that is being fixed
is. As per Uwe's request.
- Link to v3: https://lore.kernel.org/r/20250303-leds-qcom-lpg-fix-max-pwm-on-hi-res-v3-0-62703c0ab76a@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: 7ec162622e66a4ff886f8f28712ea1b13069e1aa
change-id: 20250220-leds-qcom-lpg-fix-max-pwm-on-hi-res-067e8782a79b
Best regards,
--
Abel Vesa <abel.vesa@linaro.org>
next reply other threads:[~2025-03-05 13:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 13:09 Abel Vesa [this message]
2025-03-05 13:09 ` [PATCH v4 1/3] leds: rgb: leds-qcom-lpg: Fix pwm resolution max for normal PWMs Abel Vesa
2025-03-05 13:09 ` [PATCH v4 2/3] leds: rgb: leds-qcom-lpg: Fix pwm resolution max for Hi-Res PWMs Abel Vesa
2025-03-05 13:09 ` [PATCH v4 3/3] leds: rgb: leds-qcom-lpg: Fix calculation of best period " Abel Vesa
2025-03-13 13:11 ` [PATCH v4 0/3] leds: rgb: leds-qcom-lpg: PWM fixes Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250305-leds-qcom-lpg-fix-max-pwm-on-hi-res-v4-0-bfe124a53a9f@linaro.org \
--to=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=anjelique.melendez@oss.qualcomm.com \
--cc=jishnu.prakash@oss.qualcomm.com \
--cc=johan@kernel.org \
--cc=konradybcio@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=pavel@ucw.cz \
--cc=quic_kamalw@quicinc.com \
--cc=sre@kernel.org \
--cc=stable@vger.kernel.org \
--cc=ukleinek@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).