]> git.baikalelectronics.ru Git - kernel.git/commit
clk: Introduce clk_core_has_parent()
authorMaxime Ripard <maxime@cerno.tech>
Tue, 16 Aug 2022 11:25:24 +0000 (13:25 +0200)
committerStephen Boyd <sboyd@kernel.org>
Thu, 15 Sep 2022 16:31:58 +0000 (09:31 -0700)
commit8932134c39200cb6ce5303213efabeed165bd8ef
treec167dbf4381d5d31b67e148ecf0d19b7877c0869
parent3fa125c2cf1c315ea8d103f2df4348793cff5c76
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>
Link: https://lore.kernel.org/r/20220816112530.1837489-20-maxime@cerno.tech
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
[sboyd@kernel.org: Move tmp declaration, fix conditional to check for
current parent]
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk.c
drivers/clk/clk_test.c