Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: auxdisplay: Add bindings for generic 7-segment LED

Add bindings for a generic 7-segment LED display using GPIOs.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

authored by

Chris Packham and committed by
Andy Shevchenko
4664b0bb 899383f9

+55
+55
Documentation/devicetree/bindings/auxdisplay/gpio-7-segment.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/auxdisplay/gpio-7-segment.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: GPIO based LED segment display 8 + 9 + maintainers: 10 + - Chris Packham <chris.packham@alliedtelesis.co.nz> 11 + 12 + properties: 13 + compatible: 14 + const: gpio-7-segment 15 + 16 + segment-gpios: 17 + description: | 18 + An array of GPIOs one per segment. The first GPIO corresponds to the A 19 + segment, the seventh GPIO corresponds to the G segment. Some LED blocks 20 + also have a decimal point which can be specified as an optional eighth 21 + segment. 22 + 23 + -a- 24 + | | 25 + f b 26 + | | 27 + -g- 28 + | | 29 + e c 30 + | | 31 + -d- dp 32 + 33 + minItems: 7 34 + maxItems: 8 35 + 36 + required: 37 + - segment-gpios 38 + 39 + additionalProperties: false 40 + 41 + examples: 42 + - | 43 + 44 + #include <dt-bindings/gpio/gpio.h> 45 + 46 + led-7seg { 47 + compatible = "gpio-7-segment"; 48 + segment-gpios = <&gpio 0 GPIO_ACTIVE_LOW>, 49 + <&gpio 1 GPIO_ACTIVE_LOW>, 50 + <&gpio 2 GPIO_ACTIVE_LOW>, 51 + <&gpio 3 GPIO_ACTIVE_LOW>, 52 + <&gpio 4 GPIO_ACTIVE_LOW>, 53 + <&gpio 5 GPIO_ACTIVE_LOW>, 54 + <&gpio 6 GPIO_ACTIVE_LOW>; 55 + };