RE: [PATCH v2 00/15] MTU3 counter fixes and improvements

From: Biju Das

Date: Mon Oct 05 2026 - 04:45:20 EST


Hi Cosmin,

Thanks for the series.

> -----Original Message-----
> From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@xxxxxxxxxxx>
> Sent: 04 October 2026 18:48
> Subject: [PATCH v2 00/15] MTU3 counter fixes and improvements
>
> 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.

I believe you need to rebase this series on top of[1].

Since this patch series is caching userspace values in memory,
It can support suspend to RAM as well as in suspend to RAM,we lose
the register contents, this patch series can address that limitation.
Can you also please prepare a follow up patches for STR support?

[1] https://lore.kernel.org/all/20260903090719.3498955-1-dayou5941@xxxxxxx/

Cheers,
Biju

>
> 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