From 164b67705681ed90c056529743b507229ae613a1 Mon Sep 17 00:00:00 2001 From: Robin van der Gracht Date: Mon, 18 Jan 2021 13:35:36 +0100 Subject: dt-bindings: auxdisplay: ht16k33: Keyscan function should be optional Keyscan should be optional to support simple LED matrix displays (output only). Reported-by: Michael Kaplan Signed-off-by: Robin van der Gracht [geert: Rebased] Signed-off-by: Geert Uytterhoeven Acked-by: Robin van der Gracht Signed-off-by: Miguel Ojeda --- Documentation/devicetree/bindings/display/ht16k33.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Documentation/devicetree/bindings/display') diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt index d5a8b070b467..3d602f5b9eb6 100644 --- a/Documentation/devicetree/bindings/display/ht16k33.txt +++ b/Documentation/devicetree/bindings/display/ht16k33.txt @@ -4,16 +4,19 @@ Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan Required properties: - compatible: "holtek,ht16k33" - reg: I2C slave address of the chip. -- interrupts: Interrupt specification for the key pressed interrupt. - refresh-rate-hz: Display update interval in HZ. -- debounce-delay-ms: Debouncing interval time in milliseconds. -- linux,keymap: The keymap for keys as described in the binding - document (devicetree/bindings/input/matrix-keymap.txt). Optional properties: - linux,no-autorepeat: Disable keyrepeat. - default-brightness-level: Initial brightness level [0-15] (default: 15). +- Keypad + Supply the 'interrupts' property to enable the keyscan feature. + - interrupts: Interrupt specification for the key pressed interrupt. + - debounce-delay-ms: Debouncing interval time in milliseconds. + - linux,keymap: The keymap for keys as described in the binding + document (devicetree/bindings/input/matrix-keymap.txt). + Example: &i2c1 { -- cgit v1.2.3 From f15cf04db3e706711d1311d570c3a9f493b30904 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 18 Jan 2021 13:35:37 +0100 Subject: dt-bindings: auxdisplay: ht16k33: Fix default-brightness-level range V4 changed the range from 0..15 to 1..16 in the driver, to match the dimming set hardware register, but forgot to update the DT binding documentation. Signed-off-by: Geert Uytterhoeven Acked-by: Robin van der Gracht Signed-off-by: Miguel Ojeda --- Documentation/devicetree/bindings/display/ht16k33.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/devicetree/bindings/display') diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt index 3d602f5b9eb6..ec4377697016 100644 --- a/Documentation/devicetree/bindings/display/ht16k33.txt +++ b/Documentation/devicetree/bindings/display/ht16k33.txt @@ -8,7 +8,7 @@ Required properties: Optional properties: - linux,no-autorepeat: Disable keyrepeat. -- default-brightness-level: Initial brightness level [0-15] (default: 15). +- default-brightness-level: Initial brightness level [1-16] (default: 16). - Keypad Supply the 'interrupts' property to enable the keyscan feature. -- cgit v1.2.3 From f12b457c6b25c530499438dffab4f2184e67e819 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 18 Jan 2021 13:35:38 +0100 Subject: dt-bindings: auxdisplay: ht16k33: Convert to json-schema Convert the Holtek HT16K33 LED controller with keyscan Device Tree binding documentation to json-schema. Move the file from display to auxdisplay. Update the example: - Sort properties in order of documentation, - Group tuples using angle brackets to improve human readability and enable automatic validation. Signed-off-by: Geert Uytterhoeven Acked-by: Robin van der Gracht Signed-off-by: Miguel Ojeda --- .../bindings/auxdisplay/holtek,ht16k33.yaml | 77 ++++++++++++++++++++++ .../devicetree/bindings/display/ht16k33.txt | 43 ------------ MAINTAINERS | 2 +- 3 files changed, 78 insertions(+), 44 deletions(-) create mode 100644 Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml delete mode 100644 Documentation/devicetree/bindings/display/ht16k33.txt (limited to 'Documentation/devicetree/bindings/display') diff --git a/Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml b/Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml new file mode 100644 index 000000000000..64ffff460026 --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/auxdisplay/holtek,ht16k33.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Holtek HT16K33 RAM mapping 16*8 LED controller with keyscan + +maintainers: + - Robin van der Gracht + +allOf: + - $ref: "/schemas/input/matrix-keymap.yaml#" + +properties: + compatible: + const: holtek,ht16k33 + + reg: + maxItems: 1 + + refresh-rate-hz: + maxItems: 1 + description: Display update interval in Hertz + + interrupts: + maxItems: 1 + + debounce-delay-ms: + maxItems: 1 + description: Debouncing interval time in milliseconds + + linux,keymap: true + + linux,no-autorepeat: + description: Disable keyrepeat + + default-brightness-level: + minimum: 1 + maximum: 16 + default: 16 + description: Initial brightness level + +required: + - compatible + - reg + - refresh-rate-hz + +additionalProperties: false + +examples: + - | + #include + #include + i2c1 { + #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 = , + , + , + , + , + , + , + , + , + ; + }; + }; diff --git a/Documentation/devicetree/bindings/display/ht16k33.txt b/Documentation/devicetree/bindings/display/ht16k33.txt deleted file mode 100644 index ec4377697016..000000000000 --- a/Documentation/devicetree/bindings/display/ht16k33.txt +++ /dev/null @@ -1,43 +0,0 @@ -Holtek ht16k33 RAM mapping 16*8 LED controller driver with keyscan -------------------------------------------------------------------------------- - -Required properties: -- compatible: "holtek,ht16k33" -- reg: I2C slave address of the chip. -- refresh-rate-hz: Display update interval in HZ. - -Optional properties: -- linux,no-autorepeat: Disable keyrepeat. -- default-brightness-level: Initial brightness level [1-16] (default: 16). - -- Keypad - Supply the 'interrupts' property to enable the keyscan feature. - - interrupts: Interrupt specification for the key pressed interrupt. - - debounce-delay-ms: Debouncing interval time in milliseconds. - - linux,keymap: The keymap for keys as described in the binding - document (devicetree/bindings/input/matrix-keymap.txt). - -Example: - -&i2c1 { - ht16k33: ht16k33@70 { - compatible = "holtek,ht16k33"; - reg = <0x70>; - refresh-rate-hz = <20>; - debounce-delay-ms = <50>; - interrupt-parent = <&gpio4>; - interrupts = <5 (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_EDGE_RISING)>; - 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) - >; - }; -}; diff --git a/MAINTAINERS b/MAINTAINERS index 992fe3b0900a..efa686f028a9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8159,7 +8159,7 @@ F: net/hsr/ HT16K33 LED CONTROLLER DRIVER M: Robin van der Gracht S: Maintained -F: Documentation/devicetree/bindings/display/ht16k33.txt +F: Documentation/devicetree/bindings/auxdisplay/holtek,ht16k33.yaml F: drivers/auxdisplay/ht16k33.c HTCPEN TOUCHSCREEN DRIVER -- cgit v1.2.3