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>
This commit is contained in:
parent
78be70c824
commit
b2497c1a7d
|
@ -24,13 +24,27 @@ Optional properties:
|
||||||
1 = active low.
|
1 = active low.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
/ {
|
||||||
|
clocks {
|
||||||
|
spi_uart_clk: osc_max14830 {
|
||||||
|
compatible = "fixed-clock";
|
||||||
|
#clock-cells = <0>;
|
||||||
|
clock-frequency = <3686400>;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
max14830: max14830@0 {
|
max14830: max14830@0 {
|
||||||
compatible = "maxim,max14830";
|
compatible = "maxim,max14830";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
clocks = <&clk20m>;
|
clocks = <&spi_uart_clk>;
|
||||||
clock-names = "osc";
|
clock-names = "osc";
|
||||||
interrupt-parent = <&gpio3>;
|
interrupt-parent = <&gpio3>;
|
||||||
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
|
||||||
gpio-controller;
|
gpio-controller;
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue