From: "Rafael V. Volkmer" <rafael.v.volkmer@gmail.com>
To: ukleinek@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org,
rafael.v.volkmer@gmail.com
Subject: [PATCH v6 0/6] pwm: tiehrpwm: add .get_state and tidy register handling
Date: Sun, 23 Nov 2025 20:20:27 -0300 [thread overview]
Message-ID: <20251123232029.1956-1-rafael.v.volkmer@gmail.com> (raw)
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
next reply other threads:[~2025-11-23 23:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-23 23:20 Rafael V. Volkmer [this message]
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
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=20251123232029.1956-1-rafael.v.volkmer@gmail.com \
--to=rafael.v.volkmer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@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
all inboxes | Powered by JetHome®