diff options
author | Sekhar Nori <nsekhar@ti.com> | 2019-08-01 19:12:55 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-12 13:33:38 -0400 |
commit | acbb7cd4d34caec36ff6d044a8f55325fa27459f (patch) | |
tree | 5e6a7ce2f65e365a906d16b702f9493535811242 /test | |
parent | 71cd80af863945e81f468c22e5e1afb06eba75cd (diff) | |
download | u-boot-acbb7cd4d34caec36ff6d044a8f55325fa27459f.tar.gz |
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 <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/clk.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |