dt-bindings: auxdisplay: adjust example indentation and use generic node names

The example DTS should be indented with two or four (preferred) spaces,
as mentioned in Writing Schema document.  While re-indenting, change the
node names to somehow generic names, as expected by Devicetree
specification.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Schlatterbeck <rsc@runtux.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
Krzysztof Kozlowski 2024-02-14 16:54:37 +01:00 committed by Andy Shevchenko
parent 933feb1223
commit 961454590d
4 changed files with 61 additions and 59 deletions

View File

@ -39,6 +39,6 @@ additionalProperties: false
examples:
- |
lcd@10008000 {
compatible = "arm,versatile-lcd";
reg = <0x10008000 0x1000>;
compatible = "arm,versatile-lcd";
reg = <0x10008000 0x1000>;
};

View File

@ -84,42 +84,44 @@ additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
auxdisplay {
compatible = "hit,hd44780";
display-controller {
compatible = "hit,hd44780";
data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
<&hc595 1 GPIO_ACTIVE_HIGH>,
<&hc595 2 GPIO_ACTIVE_HIGH>,
<&hc595 3 GPIO_ACTIVE_HIGH>;
enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
<&hc595 1 GPIO_ACTIVE_HIGH>,
<&hc595 2 GPIO_ACTIVE_HIGH>,
<&hc595 3 GPIO_ACTIVE_HIGH>;
enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
display-height-chars = <2>;
display-width-chars = <16>;
display-height-chars = <2>;
display-width-chars = <16>;
};
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
#address-cells = <1>;
#size-cells = <0>;
pcf8574: pcf8574@27 {
compatible = "nxp,pcf8574";
reg = <0x27>;
gpio-controller;
#gpio-cells = <2>;
};
pcf8574: gpio-expander@27 {
compatible = "nxp,pcf8574";
reg = <0x27>;
gpio-controller;
#gpio-cells = <2>;
};
};
hd44780 {
compatible = "hit,hd44780";
display-height-chars = <2>;
display-width-chars = <16>;
data-gpios = <&pcf8574 4 0>,
<&pcf8574 5 0>,
<&pcf8574 6 0>,
<&pcf8574 7 0>;
enable-gpios = <&pcf8574 2 0>;
rs-gpios = <&pcf8574 0 0>;
rw-gpios = <&pcf8574 1 0>;
backlight-gpios = <&pcf8574 3 0>;
display-controller {
compatible = "hit,hd44780";
display-height-chars = <2>;
display-width-chars = <16>;
data-gpios = <&pcf8574 4 0>,
<&pcf8574 5 0>,
<&pcf8574 6 0>,
<&pcf8574 7 0>;
enable-gpios = <&pcf8574 2 0>;
rs-gpios = <&pcf8574 0 0>;
rw-gpios = <&pcf8574 1 0>;
backlight-gpios = <&pcf8574 3 0>;
};

View File

@ -74,31 +74,31 @@ examples:
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
#address-cells = <1>;
#size-cells = <0>;
ht16k33: ht16k33@70 {
compatible = "holtek,ht16k33";
reg = <0x70>;
refresh-rate-hz = <20>;
interrupt-parent = <&gpio4>;
interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
debounce-delay-ms = <50>;
linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>,
<MATRIX_KEY(3, 0, KEY_F8)>,
<MATRIX_KEY(4, 0, KEY_F10)>,
<MATRIX_KEY(5, 0, KEY_F4)>,
<MATRIX_KEY(6, 0, KEY_F2)>,
<MATRIX_KEY(2, 1, KEY_F5)>,
<MATRIX_KEY(3, 1, KEY_F7)>,
<MATRIX_KEY(4, 1, KEY_F9)>,
<MATRIX_KEY(5, 1, KEY_F3)>,
<MATRIX_KEY(6, 1, KEY_F1)>;
display-controller@70 {
compatible = "holtek,ht16k33";
reg = <0x70>;
refresh-rate-hz = <20>;
interrupt-parent = <&gpio4>;
interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
debounce-delay-ms = <50>;
linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>,
<MATRIX_KEY(3, 0, KEY_F8)>,
<MATRIX_KEY(4, 0, KEY_F10)>,
<MATRIX_KEY(5, 0, KEY_F4)>,
<MATRIX_KEY(6, 0, KEY_F2)>,
<MATRIX_KEY(2, 1, KEY_F5)>,
<MATRIX_KEY(3, 1, KEY_F7)>,
<MATRIX_KEY(4, 1, KEY_F9)>,
<MATRIX_KEY(5, 1, KEY_F3)>,
<MATRIX_KEY(6, 1, KEY_F1)>;
led {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_BACKLIGHT;
linux,default-trigger = "backlight";
};
led {
color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_BACKLIGHT;
linux,default-trigger = "backlight";
};
};
};
};

View File

@ -50,6 +50,6 @@ additionalProperties: false
examples:
- |
lcd: lcd@17fff000 {
compatible = "img,boston-lcd";
reg = <0x17fff000 0x8>;
compatible = "img,boston-lcd";
reg = <0x17fff000 0x8>;
};