lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250417-clk-hw-get-helpers-v1-0-7743e509612a@baylibre.com>
Date: Thu, 17 Apr 2025 15:44:21 +0200
From: Jerome Brunet <jbrunet@...libre.com>
To: Michael Turquette <mturquette@...libre.com>, 
 Stephen Boyd <sboyd@...nel.org>
Cc: linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Jerome Brunet <jbrunet@...libre.com>
Subject: [PATCH 0/2] clk: add a clk_hw helpers to get the clock device or
 device_node

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@...libre.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ