Commit a992acbb authored by Stephen Boyd's avatar Stephen Boyd

clk: gate: Add some kunit test suites

Test various parts of the clk gate implementation with the kunit testing
framework.
Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Acked-by: default avatarDaniel Latypov <dlatypov@google.com>
Cc: <kunit-dev@googlegroups.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20220120175902.2165958-1-sboyd@kernel.org
parent e783362e
CONFIG_KUNIT=y
CONFIG_COMMON_CLK=y
CONFIG_CLK_GATE_KUNIT_TEST=y
...@@ -428,4 +428,12 @@ source "drivers/clk/x86/Kconfig" ...@@ -428,4 +428,12 @@ source "drivers/clk/x86/Kconfig"
source "drivers/clk/xilinx/Kconfig" source "drivers/clk/xilinx/Kconfig"
source "drivers/clk/zynqmp/Kconfig" source "drivers/clk/zynqmp/Kconfig"
# Kunit test cases
config CLK_GATE_KUNIT_TEST
tristate "Basic gate type Kunit test" if !KUNIT_ALL_TESTS
depends on KUNIT
default KUNIT_ALL_TESTS
help
Kunit test for the basic clk gate type.
endif endif
...@@ -6,6 +6,7 @@ obj-$(CONFIG_COMMON_CLK) += clk-divider.o ...@@ -6,6 +6,7 @@ obj-$(CONFIG_COMMON_CLK) += clk-divider.o
obj-$(CONFIG_COMMON_CLK) += clk-fixed-factor.o obj-$(CONFIG_COMMON_CLK) += clk-fixed-factor.o
obj-$(CONFIG_COMMON_CLK) += clk-fixed-rate.o obj-$(CONFIG_COMMON_CLK) += clk-fixed-rate.o
obj-$(CONFIG_COMMON_CLK) += clk-gate.o obj-$(CONFIG_COMMON_CLK) += clk-gate.o
obj-$(CONFIG_CLK_GATE_KUNIT_TEST) += clk-gate_test.o
obj-$(CONFIG_COMMON_CLK) += clk-multiplier.o obj-$(CONFIG_COMMON_CLK) += clk-multiplier.o
obj-$(CONFIG_COMMON_CLK) += clk-mux.o obj-$(CONFIG_COMMON_CLK) += clk-mux.o
obj-$(CONFIG_COMMON_CLK) += clk-composite.o obj-$(CONFIG_COMMON_CLK) += clk-composite.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment