clocksource/drivers/sh_cmt: Split start/stop of clock source and events
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 10 Sep 2025 14:26:56 +0000 (16:26 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 23 Sep 2025 10:42:43 +0000 (12:42 +0200)
commit0c617a3f62100ff25c291735ff907a7ca1c084ae
tree07a490289a5ee47530f93ed2186faa16ec66a6f9
parentcd32e596f02fc981674573402c1138f616df1728
clocksource/drivers/sh_cmt: Split start/stop of clock source and events

The CMT do a housekeeping such as dealing with runtime PM and
enable/disable clocks when either a clock source is enabled, or when a
new clock event is registered.

Doing this type of housekeeping for when a clock event is registered is
not always possible as it can happen in contexts where holding spinlocks
is not possible. However doing it when registering a clock source is
possible.

As a first step to address this design break apart the CMT start and
stop functions. The path for clock sources need not change, while the
one for clock events need to be reworked in future work.

There is no indented functional change, just breaking the two use-cases
controlled by a flag into two distinct functions.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250910142657.1148696-2-niklas.soderlund+renesas@ragnatech.se
drivers/clocksource/sh_cmt.c