clk: mux: add helper function for index/value translation
authorJerome Brunet <jbrunet@baylibre.com>
Wed, 14 Feb 2018 13:43:34 +0000 (14:43 +0100)
committerStephen Boyd <sboyd@kernel.org>
Mon, 12 Mar 2018 22:10:23 +0000 (15:10 -0700)
commit77deb66d262f8512130ff75ec5ea8e31070b41ed
tree4d70dd0cbcdcd116b5278392615a414935ef0635
parente6d3cc7b1fac3d7f1313faf8ac9b23830113e3ec
clk: mux: add helper function for index/value translation

Add helper functions for the translation between parent index and
register value in the generic multiplexer function. The purpose of
this change is avoid duplicating the code in other clock providers,
using the same generic logic.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-mux.c
include/linux/clk-provider.h