]> git.dujemihanovic.xyz Git - linux.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)
commit1234a2c40b8cf16041fb9acd730160e6c5b4ba13
treec167dbf4381d5d31b67e148ecf0d19b7877c0869
parent666650b25ac43700a1cce96e51a32fc89c973d28
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