mbox series

[v9,0/7] rockchip: clk: add GATE_LINK support

Message ID 20240325193609.237182-1-sebastian.reichel@collabora.com (mailing list archive)
Headers show
Series rockchip: clk: add GATE_LINK support | expand

Message

Sebastian Reichel March 25, 2024, 7:33 p.m. UTC
Hi,

This implements proper GATE_LINK support following the suggestion from Stephen
Boyd to use clk PM operations by creating MFD dynamically. This required some
restructuring, since CLK_OF_DECLARE() is called before devices are available.

Apart from improved power consumption, this fixes the runtime errors from the
pmdomain driver (failed to set idle on domain '%s').

Changes since PATCHv8:
 * https://lore.kernel.org/linux-rockchip/20240126182919.48402-1-sebastian.reichel@collabora.com/
 * rebased to v6.9-rc1
 * dropped all merged patches (i.e. all but the last one)
 * rewrote and split the final patch
   - should be easier to review
   - properly calls pm_clk_suspend/pm_clk_resume
   - now works on Orange Pi

Changes since PATCHv7:
 * https://lore.kernel.org/all/20231213185114.47565-1-sebastian.reichel@collabora.com/
 * rebased to v6.8-rc1
 * Collected Reviewed-by/Acked-by from Krzysztof Kozlowski for DT binding patches
 * support nr_clk=0 in rockchip_clk_find_max_clk_id() for smatch

Greetings,

-- Sebstian

Sebastian Reichel (7):
  clk: rockchip: rk3588: drop unused code
  clk: rockchip: handle missing clocks with -EPROBE_DEFER
  clk: rockchip: rk3588: register GATE_LINK later
  clk: rockchip: expose rockchip_clk_set_lookup
  clk: rockchip: fix error for unknown clocks
  clk: rockchip: implement linked gate clock support
  clk: rockchip: rk3588: drop RK3588_LINKED_CLK

 drivers/clk/rockchip/Makefile     |   1 +
 drivers/clk/rockchip/clk-rk3588.c | 124 +++++++++++++-----------------
 drivers/clk/rockchip/clk.c        |  71 ++++++++++++++---
 drivers/clk/rockchip/clk.h        |  37 +++++++++
 drivers/clk/rockchip/gate-link.c  |  99 ++++++++++++++++++++++++
 5 files changed, 251 insertions(+), 81 deletions(-)
 create mode 100644 drivers/clk/rockchip/gate-link.c

Comments

Heiko Stuebner Aug. 30, 2024, 3:13 p.m. UTC | #1
On Mon, 25 Mar 2024 20:33:31 +0100, Sebastian Reichel wrote:
> This implements proper GATE_LINK support following the suggestion from Stephen
> Boyd to use clk PM operations by creating MFD dynamically. This required some
> restructuring, since CLK_OF_DECLARE() is called before devices are available.
> 
> Apart from improved power consumption, this fixes the runtime errors from the
> pmdomain driver (failed to set idle on domain '%s').
> 
> [...]

Applied, thanks!

[1/7] clk: rockchip: rk3588: drop unused code
      commit: 2e7b3daa8cb1ebd17e6a7f417ef5e6553203035c

@Detlev: I think the rk3576 driver I added days ago, might also want
that change? Can you take a look please?
[I don't have rk3576 hardware, so can't check myself ;-) ]


[5/7] clk: rockchip: fix error for unknown clocks
      commit: 12fd64babaca4dc09d072f63eda76ba44119816a

I've added a fixes that to that, looks like overlooked that issue
way back in 2014 ... pure nostalgia.


Anyway, rest of the series hopefully later today.


Best regards,