]> git.baikalelectronics.ru Git - kernel.git/commit
clk: rockchip: re-add rational best approximation algorithm to the fractional divider
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Mon, 31 Jan 2022 16:32:24 +0000 (17:32 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 23 Feb 2022 23:07:16 +0000 (00:07 +0100)
commit5b1f6513fef0b10ec0269d857826da4f4d87798e
treedfa6f5c919cf31217ac24eb41d2625ab309f54e0
parent9b589a49d33b56e417153cd26a6f442a04ec67d8
clk: rockchip: re-add rational best approximation algorithm to the fractional divider

In commit 6e76de6a2a97 ("clk: fractional-divider: Export approximation
algorithm to the CCF users"), the code handling the rational best
approximation algorithm was replaced by a call to the core
clk_fractional_divider_general_approximation function which did the same
thing back then.

However, in commit b11868df6deb ("clk: fractional-divider: Introduce
POWER_OF_TWO_PS flag"), this common code was made conditional on
CLK_FRAC_DIVIDER_POWER_OF_TWO_PS flag which was not added back to the
rockchip clock driver.

This broke the ltk050h3146w-a2 MIPI DSI display present on a PX30-based
downstream board.

Let's add the flag to the fractional divider flags so that the original
and intended behavior is brought back to the rockchip clock drivers.

Fixes: b11868df6deb ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag")
Cc: stable@vger.kernel.org
Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20220131163224.708002-1-quentin.schulz@theobroma-systems.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/clk/rockchip/clk.c