[PATCH v2 00/15] MTU3 counter fixes and improvements
From: Cosmin Tanislav
Date: Sun Oct 04 2026 - 13:53:31 EST
This series does some code quality improvements to the MTU3 counter
subdriver, while also fixing bugs and adding caching support so that
registers are not touched when the counter is disabled, as there is no
request API.
Patch 3 relies on the following series to enable runtime PM on the
parent device so that the PM domain handles it automatically.
https://lore.kernel.org/lkml/20261004174024.502949-1-cosmin-gabriel.tanislav.xa@xxxxxxxxxxx
V2:
* remove clk.h include
* remove struct rz_mtu3_cnt::clk documentation
* fix struct rz_mtu3_cnt::ceiling documentation
* add struct rz_mtu3_cnt::count documentation
* add struct rz_mtu3_cnt::timer_mode documentation
* add struct rz_mtu3_cnt::mtclkc_mtclkd documentation
* add struct rz_mtu3_cnt::direction documentation
* add struct rz_mtu3_cnt::cascade_counts_enable documentation
* remove now-unused RZ_MTU3_MAX_HW_CNTR_CHANNELS macro
* move rz_mtu3_set_lwa() call after rz_mtu3_disable()
* mention the removed busy check
* mask 16-bit counter value to preserve behavior
Cosmin Tanislav (15):
counter: rz-mtu3-cnt: put runtime PM on initialization error path
counter: rz-mtu3-cnt: do not assign struct rz_mtu3_channel::dev
counter: rz-mtu3-cnt: remove manual runtime PM handling
counter: rz-mtu3-cnt: use device-managed pm_runtime_enable()
counter: rz-mtu3-cnt: read enable value from cache
counter: rz-mtu3-cnt: disable channel before releasing
counter: rz-mtu3-cnt: unify ceiling values
counter: rz-mtu3-cnt: cache ceiling values
counter: rz-mtu3-cnt: cache count values
counter: rz-mtu3-cnt: cache function values
counter: rz-mtu3-cnt: cache external input phase clock value
counter: rz-mtu3-cnt: cache direction values
counter: rz-mtu3-cnt: keep cascade_counts_enable in sync with usage
counter: rz-mtu3-cnt: drop conditional locks
counter: rz-mtu3-cnt: use pm_runtime_resume_and_get()
drivers/counter/rz-mtu3-cnt.c | 458 +++++++++++-----------------------
1 file changed, 149 insertions(+), 309 deletions(-)
--
2.55.0