Skip to content

Commit fffe003

Browse files
krzkbroonie
authored andcommitted
ASoC: dt-bindings: Correct indentation and style in DTS example
DTS example in the bindings should be indented with 2- or 4-spaces and aligned with opening '- |', so correct any differences like 3-spaces or mixtures 2- and 4-spaces in one binding. While touching the lines do other non-functional changes: replace raw number with proper define for GPIO flag and use generic node name. No functional changes here, but saves some comments during reviews of new patches built on existing code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250107125901.227995-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent a83678b commit fffe003

13 files changed

Lines changed: 197 additions & 180 deletions

Documentation/devicetree/bindings/sound/adi,ssm2518.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ unevaluatedProperties: false
3636

3737
examples:
3838
- |
39-
i2c {
40-
#address-cells = <1>;
41-
#size-cells = <0>;
42-
codec@34 {
43-
compatible = "adi,ssm2518";
44-
reg = <0x34>;
45-
gpios = <&gpio 5 0>;
46-
};
47-
};
39+
#include <dt-bindings/gpio/gpio.h>
40+
41+
i2c {
42+
#address-cells = <1>;
43+
#size-cells = <0>;
44+
codec@34 {
45+
compatible = "adi,ssm2518";
46+
reg = <0x34>;
47+
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
48+
};
49+
};

Documentation/devicetree/bindings/sound/everest,es71x4.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ unevaluatedProperties: false
5353

5454
examples:
5555
- |
56-
codec {
57-
compatible = "everest,es7134";
58-
#sound-dai-cells = <0>;
59-
VDD-supply = <&vdd_supply>;
60-
};
56+
codec {
57+
compatible = "everest,es7134";
58+
#sound-dai-cells = <0>;
59+
VDD-supply = <&vdd_supply>;
60+
};
6161
6262
...

Documentation/devicetree/bindings/sound/everest,es7241.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ unevaluatedProperties: false
5454

5555
examples:
5656
- |
57-
#include <dt-bindings/gpio/gpio.h>
58-
codec {
59-
compatible = "everest,es7241";
60-
#sound-dai-cells = <0>;
61-
reset-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
62-
VDDP-supply = <&vddp_supply>;
63-
VDDA-supply = <&vdda_supply>;
64-
VDDD-supply = <&vddd_supply>;
65-
};
57+
#include <dt-bindings/gpio/gpio.h>
58+
59+
codec {
60+
compatible = "everest,es7241";
61+
#sound-dai-cells = <0>;
62+
reset-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
63+
VDDP-supply = <&vddp_supply>;
64+
VDDA-supply = <&vdda_supply>;
65+
VDDD-supply = <&vddd_supply>;
66+
};
6667
6768
...

Documentation/devicetree/bindings/sound/fsl,easrc.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,20 @@ examples:
8787
#include <dt-bindings/clock/imx8mn-clock.h>
8888
8989
easrc: easrc@300c0000 {
90-
compatible = "fsl,imx8mn-easrc";
91-
reg = <0x300c0000 0x10000>;
92-
interrupts = <0x0 122 0x4>;
93-
clocks = <&clk IMX8MN_CLK_ASRC_ROOT>;
94-
clock-names = "mem";
95-
dmas = <&sdma2 16 23 0> , <&sdma2 17 23 0>,
96-
<&sdma2 18 23 0> , <&sdma2 19 23 0>,
97-
<&sdma2 20 23 0> , <&sdma2 21 23 0>,
98-
<&sdma2 22 23 0> , <&sdma2 23 23 0>;
99-
dma-names = "ctx0_rx", "ctx0_tx",
100-
"ctx1_rx", "ctx1_tx",
101-
"ctx2_rx", "ctx2_tx",
102-
"ctx3_rx", "ctx3_tx";
103-
firmware-name = "imx/easrc/easrc-imx8mn.bin";
104-
fsl,asrc-rate = <8000>;
105-
fsl,asrc-format = <2>;
90+
compatible = "fsl,imx8mn-easrc";
91+
reg = <0x300c0000 0x10000>;
92+
interrupts = <0x0 122 0x4>;
93+
clocks = <&clk IMX8MN_CLK_ASRC_ROOT>;
94+
clock-names = "mem";
95+
dmas = <&sdma2 16 23 0> , <&sdma2 17 23 0>,
96+
<&sdma2 18 23 0> , <&sdma2 19 23 0>,
97+
<&sdma2 20 23 0> , <&sdma2 21 23 0>,
98+
<&sdma2 22 23 0> , <&sdma2 23 23 0>;
99+
dma-names = "ctx0_rx", "ctx0_tx",
100+
"ctx1_rx", "ctx1_tx",
101+
"ctx2_rx", "ctx2_tx",
102+
"ctx3_rx", "ctx3_tx";
103+
firmware-name = "imx/easrc/easrc-imx8mn.bin";
104+
fsl,asrc-rate = <8000>;
105+
fsl,asrc-format = <2>;
106106
};

Documentation/devicetree/bindings/sound/fsl,xcvr.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,21 @@ examples:
140140
#include <dt-bindings/reset/imx8mp-reset.h>
141141
142142
xcvr: xcvr@30cc0000 {
143-
compatible = "fsl,imx8mp-xcvr";
144-
reg = <0x30cc0000 0x800>,
145-
<0x30cc0800 0x400>,
146-
<0x30cc0c00 0x080>,
147-
<0x30cc0e00 0x080>;
148-
reg-names = "ram", "regs", "rxfifo", "txfifo";
149-
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
150-
<GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
151-
<GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
152-
clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_IPG>,
153-
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_PHY>,
154-
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_SPBA2_ROOT>,
155-
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_AUDPLL_ROOT>;
156-
clock-names = "ipg", "phy", "spba", "pll_ipg";
157-
dmas = <&sdma2 30 2 0>, <&sdma2 31 2 0>;
158-
dma-names = "rx", "tx";
159-
resets = <&audiomix_reset 0>;
143+
compatible = "fsl,imx8mp-xcvr";
144+
reg = <0x30cc0000 0x800>,
145+
<0x30cc0800 0x400>,
146+
<0x30cc0c00 0x080>,
147+
<0x30cc0e00 0x080>;
148+
reg-names = "ram", "regs", "rxfifo", "txfifo";
149+
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
150+
<GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
151+
<GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
152+
clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_IPG>,
153+
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_PHY>,
154+
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_SPBA2_ROOT>,
155+
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_AUDPLL_ROOT>;
156+
clock-names = "ipg", "phy", "spba", "pll_ipg";
157+
dmas = <&sdma2 30 2 0>, <&sdma2 31 2 0>;
158+
dma-names = "rx", "tx";
159+
resets = <&audiomix_reset 0>;
160160
};

Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ unevaluatedProperties: false
7272

7373
examples:
7474
- |
75-
#include <dt-bindings/interrupt-controller/arm-gic.h>
76-
#include <dt-bindings/interrupt-controller/irq.h>
77-
#define KEEM_BAY_PSS_AUX_I2S3
78-
#define KEEM_BAY_PSS_I2S3
79-
i2s3: i2s@20140000 {
80-
compatible = "intel,keembay-i2s";
81-
#sound-dai-cells = <0>;
82-
reg = <0x20140000 0x200>, /* I2S registers */
83-
<0x202a00a4 0x4>; /* I2S gen configuration */
84-
reg-names = "i2s-regs", "i2s_gen_cfg";
85-
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
86-
clock-names = "osc", "apb_clk";
87-
clocks = <&scmi_clk KEEM_BAY_PSS_AUX_I2S3>, <&scmi_clk KEEM_BAY_PSS_I2S3>;
88-
dmas = <&axi_dma0 29>, <&axi_dma0 33>;
89-
dma-names = "tx", "rx";
90-
};
75+
#include <dt-bindings/interrupt-controller/arm-gic.h>
76+
#include <dt-bindings/interrupt-controller/irq.h>
77+
#define KEEM_BAY_PSS_AUX_I2S3
78+
#define KEEM_BAY_PSS_I2S3
79+
i2s@20140000 {
80+
compatible = "intel,keembay-i2s";
81+
#sound-dai-cells = <0>;
82+
reg = <0x20140000 0x200>, /* I2S registers */
83+
<0x202a00a4 0x4>; /* I2S gen configuration */
84+
reg-names = "i2s-regs", "i2s_gen_cfg";
85+
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
86+
clock-names = "osc", "apb_clk";
87+
clocks = <&scmi_clk KEEM_BAY_PSS_AUX_I2S3>, <&scmi_clk KEEM_BAY_PSS_I2S3>;
88+
dmas = <&axi_dma0 29>, <&axi_dma0 33>;
89+
dma-names = "tx", "rx";
90+
};

Documentation/devicetree/bindings/sound/neofidelity,ntp8918.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,18 @@ unevaluatedProperties: false
5555

5656
examples:
5757
- |
58-
#include <dt-bindings/gpio/gpio.h>
59-
i2c {
60-
#address-cells = <1>;
61-
#size-cells = <0>;
62-
audio-codec@2a {
63-
compatible = "neofidelity,ntp8918";
64-
#sound-dai-cells = <0>;
65-
reg = <0x2a>;
66-
clocks = <&clkc 150>, <&clkc 151>, <&clkc 152>;
67-
clock-names = "wck", "scl", "bck";
68-
reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
58+
#include <dt-bindings/gpio/gpio.h>
59+
60+
i2c {
61+
#address-cells = <1>;
62+
#size-cells = <0>;
63+
64+
audio-codec@2a {
65+
compatible = "neofidelity,ntp8918";
66+
#sound-dai-cells = <0>;
67+
reg = <0x2a>;
68+
clocks = <&clkc 150>, <&clkc 151>, <&clkc 152>;
69+
clock-names = "wck", "scl", "bck";
70+
reset-gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
71+
};
6972
};
70-
};

Documentation/devicetree/bindings/sound/ti,pcm6240.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,21 @@ additionalProperties: false
159159

160160
examples:
161161
- |
162-
#include <dt-bindings/gpio/gpio.h>
163-
i2c {
164-
/* example for two devices with interrupt support */
165-
#address-cells = <1>;
166-
#size-cells = <0>;
167-
pcm6240: audio-codec@48 {
168-
compatible = "ti,pcm6240";
169-
reg = <0x48>, /* primary-device */
170-
<0x4b>; /* secondary-device */
171-
#sound-dai-cells = <0>;
172-
reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
173-
interrupt-parent = <&gpio1>;
174-
interrupts = <15>;
175-
};
176-
};
162+
#include <dt-bindings/gpio/gpio.h>
163+
164+
i2c {
165+
/* example for two devices with interrupt support */
166+
#address-cells = <1>;
167+
#size-cells = <0>;
168+
169+
audio-codec@48 {
170+
compatible = "ti,pcm6240";
171+
reg = <0x48>, /* primary-device */
172+
<0x4b>; /* secondary-device */
173+
#sound-dai-cells = <0>;
174+
reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
175+
interrupt-parent = <&gpio1>;
176+
interrupts = <15>;
177+
};
178+
};
177179
...

Documentation/devicetree/bindings/sound/ti,tas2562.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,19 @@ unevaluatedProperties: false
6565

6666
examples:
6767
- |
68-
#include <dt-bindings/gpio/gpio.h>
69-
i2c {
70-
#address-cells = <1>;
71-
#size-cells = <0>;
72-
codec: codec@4c {
73-
compatible = "ti,tas2562";
74-
reg = <0x4c>;
75-
#sound-dai-cells = <0>;
76-
interrupt-parent = <&gpio1>;
77-
interrupts = <14>;
78-
shutdown-gpios = <&gpio1 15 0>;
79-
ti,imon-slot-no = <0>;
80-
};
81-
};
68+
#include <dt-bindings/gpio/gpio.h>
69+
70+
i2c {
71+
#address-cells = <1>;
72+
#size-cells = <0>;
73+
74+
codec@4c {
75+
compatible = "ti,tas2562";
76+
reg = <0x4c>;
77+
#sound-dai-cells = <0>;
78+
interrupt-parent = <&gpio1>;
79+
interrupts = <14>;
80+
shutdown-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
81+
ti,imon-slot-no = <0>;
82+
};
83+
};

Documentation/devicetree/bindings/sound/ti,tas2770.yaml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,19 +69,21 @@ unevaluatedProperties: false
6969

7070
examples:
7171
- |
72-
#include <dt-bindings/gpio/gpio.h>
73-
i2c {
74-
#address-cells = <1>;
75-
#size-cells = <0>;
76-
codec: codec@41 {
77-
compatible = "ti,tas2770";
78-
reg = <0x41>;
79-
#sound-dai-cells = <0>;
80-
interrupt-parent = <&gpio1>;
81-
interrupts = <14>;
82-
reset-gpio = <&gpio1 15 0>;
83-
shutdown-gpios = <&gpio1 14 0>;
84-
ti,imon-slot-no = <0>;
85-
ti,vmon-slot-no = <2>;
86-
};
87-
};
72+
#include <dt-bindings/gpio/gpio.h>
73+
74+
i2c {
75+
#address-cells = <1>;
76+
#size-cells = <0>;
77+
78+
codec@41 {
79+
compatible = "ti,tas2770";
80+
reg = <0x41>;
81+
#sound-dai-cells = <0>;
82+
interrupt-parent = <&gpio1>;
83+
interrupts = <14>;
84+
reset-gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
85+
shutdown-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
86+
ti,imon-slot-no = <0>;
87+
ti,vmon-slot-no = <2>;
88+
};
89+
};

0 commit comments

Comments
 (0)