Linux clock framework development
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: add a clk_hw helpers to get the clock device or device_node
@ 2025-04-17 13:44 Jerome Brunet
  2025-04-17 13:44 ` [PATCH 1/2] " Jerome Brunet
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jerome Brunet @ 2025-04-17 13:44 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd; +Cc: linux-clk, linux-kernel, Jerome Brunet

This patchset adds helpers to get the device or device_node associated with
clk_hw. This can be used by clock drivers to access various device related
functionality. The 2nd changes adds kunit test coverage for the new helpers

This patchset is the v4 of the series previously sent here [1], with the
amlogic patches dropped for now. I'll resume the work on the amlogic
changes when the helpers are available in CCF core.

Added tests run example:
     KTAP version 1
     # Subtest: clk_hw_register_get_dev_of_node_test_suite
     # module: clk_test
     1..2
         KTAP version 1
         # Subtest: clk_hw_register_get_dev_test
         ok 1 clock with device reference
         ok 2 clock missing device reference
     # clk_hw_register_get_dev_test: pass:2 fail:0 skip:0 total:2
     ok 1 clk_hw_register_get_dev_test
         KTAP version 1
         # Subtest: clk_hw_register_get_of_node_test
         ok 1 clock with device reference
         ok 2 clock missing device reference
     # clk_hw_register_get_of_node_test: pass:2 fail:0 skip:0 total:2
     ok 2 clk_hw_register_get_of_node_test
 # clk_hw_register_get_dev_of_node_test_suite: pass:2 fail:0 skip:0 total:2
 # Totals: pass:4 fail:0 skip:0 total:4
 ok 17 clk_hw_register_get_dev_of_node_test_suite
     KTAP version 1
     # Subtest: of_clk_hw_register_get_dev_of_node_test_suite
     # module: clk_test
     1..2
         KTAP version 1
         # Subtest: of_clk_hw_register_get_dev_test
         ok 1 clock with of_node reference
         ok 2 clock missing of_node reference
     # of_clk_hw_register_get_dev_test: pass:2 fail:0 skip:0 total:2
     ok 1 of_clk_hw_register_get_dev_test
         KTAP version 1
         # Subtest: of_clk_hw_register_get_of_node_test
         ok 1 clock with of_node reference
         ok 2 clock missing of_node reference
     # of_clk_hw_register_get_of_node_test: pass:2 fail:0 skip:0 total:2
     ok 2 of_clk_hw_register_get_of_node_test
 # of_clk_hw_register_get_dev_of_node_test_suite: pass:2 fail:0 skip:0 total:2
 # Totals: pass:4 fail:0 skip:0 total:4

[1]: https://lore.kernel.org/linux-clk/20250120-amlogic-clk-drop-clk-regmap-tables-v3-0-126244146947@baylibre.com

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
Jerome Brunet (2):
      clk: add a clk_hw helpers to get the clock device or device_node
      clk: tests: add clk_hw_get_dev() and clk_hw_get_of_node() tests

 drivers/clk/Makefile                          |   1 +
 drivers/clk/clk.c                             |  12 ++
 drivers/clk/clk_test.c                        | 215 ++++++++++++++++++++++++--
 drivers/clk/kunit_clk_hw_get_dev_of_node.dtso |  10 ++
 include/linux/clk-provider.h                  |  26 ++++
 5 files changed, 247 insertions(+), 17 deletions(-)
---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250415-clk-hw-get-helpers-c2344d404f3c

Best regards,
-- 
Jerome


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-06-23  8:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 13:44 [PATCH 0/2] clk: add a clk_hw helpers to get the clock device or device_node Jerome Brunet
2025-04-17 13:44 ` [PATCH 1/2] " Jerome Brunet
2025-05-05  9:33   ` Jerome Brunet
2025-06-02 16:42   ` Brian Masney
2025-06-20  7:18   ` Stephen Boyd
2025-04-17 13:44 ` [PATCH 2/2] clk: tests: add clk_hw_get_dev() and clk_hw_get_of_node() tests Jerome Brunet
2025-06-02 17:06   ` Brian Masney
2025-06-20  7:18   ` Stephen Boyd
2025-06-02 11:59 ` [PATCH 0/2] clk: add a clk_hw helpers to get the clock device or device_node Jerome Brunet
2025-06-20  7:20 ` Stephen Boyd
2025-06-23  8:34   ` Jerome Brunet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox