Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: max310x: Document clock setup

As a kernel newcomer, I got bitten by lack of examples on this front. I
had troubles figuring out where these clocks could be defined ("/clocks"
is where the generic infrastructure expects them).

One should also ensure that a unique name is used. Generic names such as
"osc" tend to be already used by some board-wide clock crystals.

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jan Kundrát and committed by
Greg Kroah-Hartman
b2497c1a 78be70c8

+15 -1
+15 -1
Documentation/devicetree/bindings/serial/maxim,max310x.txt
··· 24 24 1 = active low. 25 25 26 26 Example: 27 + 28 + / { 29 + clocks { 30 + spi_uart_clk: osc_max14830 { 31 + compatible = "fixed-clock"; 32 + #clock-cells = <0>; 33 + clock-frequency = <3686400>; 34 + }; 35 + 36 + }; 37 + }; 38 + 39 + &spi0 { 27 40 max14830: max14830@0 { 28 41 compatible = "maxim,max14830"; 29 42 reg = <0>; 30 - clocks = <&clk20m>; 43 + clocks = <&spi_uart_clk>; 31 44 clock-names = "osc"; 32 45 interrupt-parent = <&gpio3>; 33 46 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 34 47 gpio-controller; 35 48 #gpio-cells = <2>; 36 49 }; 50 + };