From 1fe243a1e42fe99da0fa45c8c727f9c3d599c6c9 Mon Sep 17 00:00:00 2001 From: Fabrice Gasnier Date: Tue, 24 Jul 2018 16:31:28 +0200 Subject: clk: add clk_valid() Add clk_valid() to check for optional clocks are valid. Call clk_valid() in test/dm/clk.c and add relevant test routine to sandbox clk tests. Signed-off-by: Fabrice Gasnier Reviewed-by: Simon Glass --- 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 b06906a3ecf..898c034e27b 100644 --- a/test/dm/clk.c +++ b/test/dm/clk.c @@ -28,6 +28,7 @@ static int dm_test_clk(struct unit_test_state *uts) ut_assertok(uclass_get_device_by_name(UCLASS_MISC, "clk-test", &dev_test)); ut_assertok(sandbox_clk_test_get(dev_test)); + ut_assertok(sandbox_clk_test_valid(dev_test)); ut_asserteq(1234, sandbox_clk_test_get_rate(dev_test, -- cgit v1.2.3