]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
clk: honor CLK_MUX_ROUND_CLOSEST in generic clk mux
authorJerome Brunet <jbrunet@baylibre.com>
Mon, 9 Apr 2018 13:59:20 +0000 (15:59 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:55:05 +0000 (14:55 +0200)
commit7c3c609789635eada06266287edfb9d041a6eedf
treee6a79e9b67c23dc4707c5886eea934b8e7a9f914
parentfa1eba4dc5f1517729fee5987afe96dcb2fe2e60
clk: honor CLK_MUX_ROUND_CLOSEST in generic clk mux

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 4ad69b80e886a845f56ce0a3d10211208693d92b ]

CLK_MUX_ROUND_CLOSEST is part of the clk_mux documentation but clk_mux
directly calls __clk_mux_determine_rate(), which overrides the flag.
As result, if clk_mux is instantiated with CLK_MUX_ROUND_CLOSEST, the
flag will be ignored and the clock rounded down.

To solve this, this patch expose clk_mux_determine_rate_flags() in the
clk-provider API and uses it in the determine_rate() callback of clk_mux.

Fixes: 15a02c1f6dd7 ("clk: Add __clk_mux_determine_rate_closest")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/clk/clk-mux.c
drivers/clk/clk.c
include/linux/clk-provider.h