summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2022-02-25 15:35:29 +0100
committerStephen Boyd <sboyd@kernel.org>2022-03-11 19:15:03 -0800
commitc97448437847bd76116b3a077e44808e946bb1ae (patch)
treeab81413331c8fc78080bb4c17b2a7d6c2c8bb3a0 /drivers/clk
parentc80ac50cbb378a4029129a596251747386e3c8e9 (diff)
clk: Add clk_drop_range
In order to reset the range on a clock, we need to call clk_set_rate_range with a minimum of 0 and a maximum of ULONG_MAX. Since it's fairly inconvenient, let's introduce a clk_drop_range() function that will do just this. Suggested-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220225143534.405820-8-maxime@cerno.tech Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/clk_test.c b/drivers/clk/clk_test.c
index 8924a5ac56d8..48f95d1784c8 100644
--- a/drivers/clk/clk_test.c
+++ b/drivers/clk/clk_test.c
@@ -645,7 +645,7 @@ static void clk_range_test_multiple_set_range_rate_maximized(struct kunit *test)
KUNIT_EXPECT_EQ(test, rate, DUMMY_CLOCK_RATE_1);
KUNIT_ASSERT_EQ(test,
- clk_set_rate_range(user2, 0, ULONG_MAX),
+ clk_drop_range(user2),
0);
rate = clk_get_rate(clk);
@@ -762,7 +762,7 @@ static void clk_range_test_multiple_set_range_rate_minimized(struct kunit *test)
KUNIT_EXPECT_EQ(test, rate, DUMMY_CLOCK_RATE_2);
KUNIT_ASSERT_EQ(test,
- clk_set_rate_range(user2, 0, ULONG_MAX),
+ clk_drop_range(user2),
0);
rate = clk_get_rate(clk);