clk, clk-si5341: Support multiple input ports
authorMike Looijmans <mike.looijmans@topic.nl>
Tue, 7 Jan 2020 07:53:40 +0000 (08:53 +0100)
committerStephen Boyd <sboyd@kernel.org>
Tue, 28 Jan 2020 21:05:54 +0000 (13:05 -0800)
commit692751879ea876dec81357e6f1f8ca0ced131ceb
tree0fc5b9937504fb081171b6500537e8e78236e9e9
parente42617b825f8073569da76dc4510bfa019b1c35a
clk, clk-si5341: Support multiple input ports

The Si5341 and Si5340 have multiple input clock options. So far, the driver
only supported the XTAL input, this adds support for the three external
clock inputs as well.

If the clock chip isn't programmed at boot, the driver will default to the
XTAL input as before. If there is no "xtal" clock input available, it will
pick the first connected input (e.g. "in0") as the input clock for the PLL.
One can use clock-assigned-parents to select a particular clock as input.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Link: https://lkml.kernel.org/r/20200107075340.14528-1-mike.looijmans@topic.nl
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-si5341.c