From acbb7cd4d34caec36ff6d044a8f55325fa27459f Mon Sep 17 00:00:00 2001 From: Sekhar Nori Date: Thu, 1 Aug 2019 19:12:55 +0530 Subject: clk: add support for clk_is_match() Add support for clk_is_match() which is required to know if two clock pointers point to the same exact physical clock. Also add a unit test for the new API. Reviewed-by: Lokesh Vutla Signed-off-by: Sekhar Nori --- test/dm/clk.c | 1 + 1 file changed, 1 insertion(+) (limited to 'test/dm/clk.c') diff --git a/test/dm/clk.c b/test/dm/clk.c index f301ecbb45..676ef217f0 100644 --- a/test/dm/clk.c +++ b/test/dm/clk.c @@ -24,6 +24,7 @@ static int dm_test_clk_base(struct unit_test_state *uts) /* Get the same clk port in 2 different ways and compare */ ut_assertok(clk_get_by_index(dev, 1, &clk_method1)); ut_assertok(clk_get_by_index_nodev(dev_ofnode(dev), 1, &clk_method2)); + ut_asserteq(clk_is_match(&clk_method1, &clk_method2), true); ut_asserteq(clk_method1.id, clk_method2.id); return 0; -- cgit