mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/6] pwm: tiehrpwm: add .get_state and tidy register handling
@ 2025-11-23 23:20 Rafael V. Volkmer
  2025-11-23 23:25 ` [PATCH v6 1/6] pwm: tiehrpwm: use GENMASK() and FIELD_PREP() for register fields Rafael V. Volkmer
  0 siblings, 1 reply; 13+ messages in thread
From: Rafael V. Volkmer @ 2025-11-23 23:20 UTC (permalink / raw)
  To: ukleinek; +Cc: linux-kernel, linux-pwm, rafael.v.volkmer

On Fri, 12 Sep 2025 11:57:44 +0200, Uwe Kleine-König wrote:
> FTR: I applied my series now and it should appear in next on Monday. So
> going forward should have become a tad easier for you.

Hi Uwe,

This v6 is rebased on top of your recent tiehrpwm series in pwm/for-next,
so all of your fixes (including the prescaler corner case and AQCTL cleanups)
are kept as-is and this series only builds on that behaviour.

The only places where there is some unavoidable "policy" are .get_state()
and the probe-time handling of channels that firmware might have left
running. Both follow the same semantics that the driver already used:
a channel is considered enabled if AQCTL is non-zero and not software-
forced in AQCSFRC, and disabled otherwise. At probe we take a best-effort
snapshot of AQCTL(A/B) and AQCSFRC before touching clocks or runtime PM;
if the block is power-gated or the clock is off these registers read as
0 and we deliberately interpret that as "not configured / disabled" to
avoid inventing state that the hardware doesnt expose.

For channels that look active at probe, we only bring tbclk and runtime PM
usage into line with what is already programmed in hardware; we dont
introduce any additional permanent bias beyond reflecting that observed
state.

Best regards,
Rafael V. Volkmer

Rafael .V Volkmer (6):
  pwm: tiehrpwm: use GENMASK() and FIELD_PREP() for register fields
  pwm: tiehrpwm: use GENMASK() and FIELD_PREP() for prescalers
  pwm: tiehrpwm: refactor AQCTL polarity macros
  pwm: tiehrpwm: implement .get_state callback
  pwm: tiehrpwm: handle already-running channels at probe
  pwm: tiehrpwm: tidy period conflict check

 drivers/pwm/pwm-tiehrpwm.c | 332 ++++++++++++++++++++++++++++---------
 1 file changed, 258 insertions(+), 74 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2025-11-26  7:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-23 23:20 [PATCH v6 0/6] pwm: tiehrpwm: add .get_state and tidy register handling Rafael V. Volkmer
2025-11-23 23:25 ` [PATCH v6 1/6] pwm: tiehrpwm: use GENMASK() and FIELD_PREP() for register fields Rafael V. Volkmer
2025-11-23 23:27   ` [PATCH v6 2/6] pwm: tiehrpwm: use GENMASK() and FIELD_PREP() for prescalers Rafael V. Volkmer
2025-11-23 23:29     ` [PATCH v6 3/6] pwm: tiehrpwm: refactor AQCTL polarity macros Rafael V. Volkmer
2025-11-23 23:31       ` [PATCH v6 4/6] pwm: tiehrpwm: implement .get_state callback Rafael V. Volkmer
2025-11-23 23:33         ` [PATCH v6 5/6] pwm: tiehrpwm: handle already-running channels at probe Rafael V. Volkmer
2025-11-23 23:35           ` [PATCH v6 6/6] pwm: tiehrpwm: tidy period conflict check Rafael V. Volkmer
2025-11-24 16:51         ` [PATCH v6 4/6] pwm: tiehrpwm: implement .get_state callback Uwe Kleine-König
2025-11-25  3:48           ` Rafael V. Volkmer
2025-11-25  7:52             ` Uwe Kleine-König
2025-11-25 20:39               ` Rafael V. Volkmer
2025-11-26  7:48                 ` Uwe Kleine-König
2025-11-24 10:36   ` [PATCH v6 1/6] pwm: tiehrpwm: use GENMASK() and FIELD_PREP() for register fields Uwe Kleine-König

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®