bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0838-clk-tests-Add-test-suites-description.patch
1 From 3f935fd9776cace286d40ab37726f80c8d2ed8b1 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Fri, 1 Apr 2022 17:08:26 +0200
4 Subject: [PATCH] clk: tests: Add test suites description
5
6 We start to have a few test suites, and we'll add more, so it will get
7 pretty confusing to figure out what is supposed to be tested in what
8 suite.
9
10 Let's add some comments to explain what setup they create, and what we
11 should be testing in every suite.
12
13 Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
14 Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
15 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
16 ---
17 drivers/clk/clk_test.c | 36 ++++++++++++++++++++++++++++++++++++
18 1 file changed, 36 insertions(+)
19
20 --- a/drivers/clk/clk_test.c
21 +++ b/drivers/clk/clk_test.c
22 @@ -250,6 +250,11 @@ static struct kunit_case clk_test_cases[
23 {}
24 };
25
26 +/*
27 + * Test suite for a basic rate clock, without any parent.
28 + *
29 + * These tests are supposed to exercise the rate API with simple scenarios
30 + */
31 static struct kunit_suite clk_test_suite = {
32 .name = "clk-test",
33 .init = clk_test_init,
34 @@ -336,6 +341,14 @@ static struct kunit_case clk_orphan_tran
35 {}
36 };
37
38 +/*
39 + * Test suite for a basic mux clock with one parent. The parent is
40 + * registered after its child. The clock will thus be orphan when
41 + * registered, but will no longer be when the tests run.
42 + *
43 + * These tests are supposed to make sure a clock that used to be orphan
44 + * has a sane, consistent, behaviour.
45 + */
46 static struct kunit_suite clk_orphan_transparent_single_parent_test_suite = {
47 .name = "clk-orphan-transparent-single-parent-test",
48 .init = clk_orphan_transparent_single_parent_mux_test_init,
49 @@ -645,6 +658,13 @@ static struct kunit_case clk_range_test_
50 {}
51 };
52
53 +/*
54 + * Test suite for a basic rate clock, without any parent.
55 + *
56 + * These tests are supposed to exercise the rate range API
57 + * (clk_set_rate_range, clk_set_min_rate, clk_set_max_rate,
58 + * clk_drop_range).
59 + */
60 static struct kunit_suite clk_range_test_suite = {
61 .name = "clk-range-test",
62 .init = clk_test_init,
63 @@ -822,6 +842,14 @@ static struct kunit_case clk_range_maxim
64 {}
65 };
66
67 +/*
68 + * Test suite for a basic rate clock, without any parent.
69 + *
70 + * These tests are supposed to exercise the rate range API
71 + * (clk_set_rate_range, clk_set_min_rate, clk_set_max_rate,
72 + * clk_drop_range), with a driver that will always try to run at the
73 + * highest possible rate.
74 + */
75 static struct kunit_suite clk_range_maximize_test_suite = {
76 .name = "clk-range-maximize-test",
77 .init = clk_maximize_test_init,
78 @@ -991,6 +1019,14 @@ static struct kunit_case clk_range_minim
79 {}
80 };
81
82 +/*
83 + * Test suite for a basic rate clock, without any parent.
84 + *
85 + * These tests are supposed to exercise the rate range API
86 + * (clk_set_rate_range, clk_set_min_rate, clk_set_max_rate,
87 + * clk_drop_range), with a driver that will always try to run at the
88 + * lowest possible rate.
89 + */
90 static struct kunit_suite clk_range_minimize_test_suite = {
91 .name = "clk-range-minimize-test",
92 .init = clk_minimize_test_init,