From: "Màxim Pedraza Padilla" <maximpedraza@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 0/5] pwm: tiecap: Assorted fixes and improvements
Date: Tue, 1 Dec 2026 10:03:30 +0100 [thread overview]
Message-ID: <20261201090330.223238-1-maximpedraza@gmail.com> (raw)
In-Reply-To: <cover.1795800756.git.u.kleine-koenig@baylibre.com>
Hello Uwe,
On Fri, Nov 27, 2026 at 06:39:39PM +0100, Uwe Kleine-König wrote:
> I didn't mark the 2nd patch as a fix as it might result in power
> regressions during suspend as the clock is kept enabled there. So it
> would be awesome if someone with the hardware could test that.
Thanks for picking up the .get_state() patch, and for the series.
I tested it on an AM3354 board with eCAP0 driving a pwm-backlight, left
running by U-Boot, on a v7.4-rc2 based tree with PWM_DEBUG enabled,
comparing the kernel with and without the series:
- The backlight inherited from the bootloader is taken over unchanged
(83330/125000 ns), all brightness levels apply as expected and the
CAP registers match the requested state. No PWM_DEBUG warnings.
- Suspend with pm_test=devices, for both freeze and mem, with the
backlight on and off: the PWM comes back with the same state, same
result as without the series.
- Through sysfs: a 5 ns period (below one 10 ns tick) now fails with
-EINVAL, where before it was applied as 10 ns and PWM_DEBUG
complained about rounding up. Periods above 1 s, which used to give
-ERANGE, now work: 2 s and 42.9 s are applied, and 50 s saturates at
0xffffffff ticks and is reported as 42949672950 ns. Duty cycles of 0,
50 and 100 % and inversed polarity are fine.
- With the series, l4ls_gclk has one more enable/prepare count and a
protect count of 1, and nothing complains about the rate lock.
About the power concern with patch 2: on AM335x the "fck" of the eCAP
is l4ls_gclk, a fixed-factor clock without a gate, so keeping it
enabled doesn't change the hardware. The module is gated by runtime PM
through ti-sysc, which the series doesn't touch: with the PWM disabled,
CM_PER_EPWMSS0_CLKCTRL reads 0x00030000 (module disabled) with and
without the series. So I don't expect any difference there. I haven't
measured the current yet; I plan to put a shunt in the VDD_CORE rail
and will report back if it shows anything.
Tested-by: Màxim Pedraza Padilla <maximpedraza@gmail.com>
Best regards,
Màxim
prev parent reply other threads:[~2026-12-01 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 17:39 Uwe Kleine-König
2026-11-27 17:39 ` [PATCH v1 1/5] pwm: tiecap: Fix type of variable holding clock rate Uwe Kleine-König
2026-11-27 17:39 ` [PATCH v1 2/5] pwm: tiecap: Ensure the input clock is enabled Uwe Kleine-König
2026-11-27 17:39 ` [PATCH v1 3/5] pwm: tiecap: Use dev_err_probe() for error handling in .probe() Uwe Kleine-König
2026-11-27 17:39 ` [PATCH v1 4/5] pwm: tiecap: Make sure the input clock doesn't change rate Uwe Kleine-König
2026-11-27 17:39 ` [PATCH v1 5/5] pwm: tiecap: Improve period calculation around overflow handling Uwe Kleine-König
2026-12-01 9:03 ` Màxim Pedraza Padilla [this message]
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=20261201090330.223238-1-maximpedraza@gmail.com \
--to=maximpedraza@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/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
all inboxes | Powered by JetHome®