Commit 96145459 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Andy Shevchenko

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 933feb12
...@@ -39,6 +39,6 @@ additionalProperties: false ...@@ -39,6 +39,6 @@ additionalProperties: false
examples: examples:
- | - |
lcd@10008000 { lcd@10008000 {
compatible = "arm,versatile-lcd"; compatible = "arm,versatile-lcd";
reg = <0x10008000 0x1000>; reg = <0x10008000 0x1000>;
}; };
...@@ -84,42 +84,44 @@ additionalProperties: false ...@@ -84,42 +84,44 @@ additionalProperties: false
examples: examples:
- | - |
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
auxdisplay { display-controller {
compatible = "hit,hd44780"; compatible = "hit,hd44780";
data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>, data-gpios = <&hc595 0 GPIO_ACTIVE_HIGH>,
<&hc595 1 GPIO_ACTIVE_HIGH>, <&hc595 1 GPIO_ACTIVE_HIGH>,
<&hc595 2 GPIO_ACTIVE_HIGH>, <&hc595 2 GPIO_ACTIVE_HIGH>,
<&hc595 3 GPIO_ACTIVE_HIGH>; <&hc595 3 GPIO_ACTIVE_HIGH>;
enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>; enable-gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>; rs-gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
display-height-chars = <2>; display-height-chars = <2>;
display-width-chars = <16>; display-width-chars = <16>;
}; };
- | - |
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
i2c { i2c {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
pcf8574: pcf8574@27 { pcf8574: gpio-expander@27 {
compatible = "nxp,pcf8574"; compatible = "nxp,pcf8574";
reg = <0x27>; reg = <0x27>;
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
}; };
}; };
hd44780 {
compatible = "hit,hd44780"; display-controller {
display-height-chars = <2>; compatible = "hit,hd44780";
display-width-chars = <16>; display-height-chars = <2>;
data-gpios = <&pcf8574 4 0>, display-width-chars = <16>;
<&pcf8574 5 0>, data-gpios = <&pcf8574 4 0>,
<&pcf8574 6 0>, <&pcf8574 5 0>,
<&pcf8574 7 0>; <&pcf8574 6 0>,
enable-gpios = <&pcf8574 2 0>; <&pcf8574 7 0>;
rs-gpios = <&pcf8574 0 0>; enable-gpios = <&pcf8574 2 0>;
rw-gpios = <&pcf8574 1 0>; rs-gpios = <&pcf8574 0 0>;
backlight-gpios = <&pcf8574 3 0>; rw-gpios = <&pcf8574 1 0>;
backlight-gpios = <&pcf8574 3 0>;
}; };
...@@ -74,31 +74,31 @@ examples: ...@@ -74,31 +74,31 @@ examples:
#include <dt-bindings/input/input.h> #include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h> #include <dt-bindings/leds/common.h>
i2c { i2c {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
ht16k33: ht16k33@70 { display-controller@70 {
compatible = "holtek,ht16k33"; compatible = "holtek,ht16k33";
reg = <0x70>; reg = <0x70>;
refresh-rate-hz = <20>; refresh-rate-hz = <20>;
interrupt-parent = <&gpio4>; interrupt-parent = <&gpio4>;
interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>; interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>;
debounce-delay-ms = <50>; debounce-delay-ms = <50>;
linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>, linux,keymap = <MATRIX_KEY(2, 0, KEY_F6)>,
<MATRIX_KEY(3, 0, KEY_F8)>, <MATRIX_KEY(3, 0, KEY_F8)>,
<MATRIX_KEY(4, 0, KEY_F10)>, <MATRIX_KEY(4, 0, KEY_F10)>,
<MATRIX_KEY(5, 0, KEY_F4)>, <MATRIX_KEY(5, 0, KEY_F4)>,
<MATRIX_KEY(6, 0, KEY_F2)>, <MATRIX_KEY(6, 0, KEY_F2)>,
<MATRIX_KEY(2, 1, KEY_F5)>, <MATRIX_KEY(2, 1, KEY_F5)>,
<MATRIX_KEY(3, 1, KEY_F7)>, <MATRIX_KEY(3, 1, KEY_F7)>,
<MATRIX_KEY(4, 1, KEY_F9)>, <MATRIX_KEY(4, 1, KEY_F9)>,
<MATRIX_KEY(5, 1, KEY_F3)>, <MATRIX_KEY(5, 1, KEY_F3)>,
<MATRIX_KEY(6, 1, KEY_F1)>; <MATRIX_KEY(6, 1, KEY_F1)>;
led { led {
color = <LED_COLOR_ID_RED>; color = <LED_COLOR_ID_RED>;
function = LED_FUNCTION_BACKLIGHT; function = LED_FUNCTION_BACKLIGHT;
linux,default-trigger = "backlight"; linux,default-trigger = "backlight";
};
}; };
}; };
};
...@@ -50,6 +50,6 @@ additionalProperties: false ...@@ -50,6 +50,6 @@ additionalProperties: false
examples: examples:
- | - |
lcd: lcd@17fff000 { lcd: lcd@17fff000 {
compatible = "img,boston-lcd"; compatible = "img,boston-lcd";
reg = <0x17fff000 0x8>; reg = <0x17fff000 0x8>;
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment