mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-20 21:51:20 +00:00
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>
This commit is contained in:
parent
71cd80af86
commit
acbb7cd4d3
3 changed files with 26 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue