clk: Introduce clk_core_has_parent()
authorMaxime Ripard <maxime@cerno.tech>
Thu, 7 Apr 2022 12:11:37 +0000 (14:11 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Fri, 22 Apr 2022 09:17:27 +0000 (10:17 +0100)
commita75b841d1c03d724128caee1b8adc26d9d9ec632
treecce0711b18e3e59949ee4f4784ec2baa35c0df37
parent004ce0158b9a741f2d3613f0de5c542e51390063
clk: Introduce clk_core_has_parent()

We will need to know if a clk_core pointer has a given parent in other
functions, so let's create a clk_core_has_parent() function that
clk_has_parent() will call into.

For good measure, let's add some unit tests as well to make sure it
works properly.

Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/clk/clk.c
drivers/clk/clk_test.c