OSDN Git Service

clk: vc5: Configure the output buffer input mux on prepare
authorMarek Vasut <marek.vasut@gmail.com>
Sun, 9 Jul 2017 13:28:10 +0000 (15:28 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Mon, 17 Jul 2017 18:50:59 +0000 (11:50 -0700)
commit718f4694ea15a1033f48ea2e44f6428df705a1a8
treeb89631af30454434e4969106bf48fc7e5623faf9
parent325b7b90f9a87a4bdee7059d10bd98a11154ceae
clk: vc5: Configure the output buffer input mux on prepare

The output buffer input mux can be configured in either of three
states -- disabled, input from FOD, input from previous output.
Once the .prepare() callback of the output buffer is called, the
output buffer input mux must be set to either input from FOD or
input from previous output, it cannot be set to Disabled anymore
or the output won't work.

Default to the input from FOD if the output buffer input mux was
Disabled and the .prepare() was called on it.

Note that we do not set the output buffer input mux back to Disabled
in the .unprepare() callback as there is no obvious benefit of doing
so. We disable the entire output buffer in the .unprepare() callback
already.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Alexey Firago <alexey_firago@mentor.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-renesas-soc@vger.kernel.org
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # Salvator-XS with the display LVDS output.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-versaclock5.c