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

dt-bindings: gpio: Convert STMPE GPIO to YAML schema

This rewrites the STMPE GPIO bindings to a YAML schema.

We add the properties that are used in the widely used
STMPE GPIO device nodes found in the wild, most notably
interrupt support, so interrupt-cells and
interrupt-controller is now part of the bindings.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Linus Walleij and committed by
Bartosz Golaszewski
6c19974d 1c23553a

+53 -17
-17
Documentation/devicetree/bindings/gpio/gpio-stmpe.txt
··· 1 - STMPE gpio 2 - ---------- 3 - 4 - Required properties: 5 - - compatible: "st,stmpe-gpio" 6 - 7 - Optional properties: 8 - - st,norequest-mask: bitmask specifying which GPIOs should _not_ be requestable 9 - due to different usage (e.g. touch, keypad) 10 - 11 - Node should be child node of stmpe node to which it belongs. 12 - 13 - Example: 14 - stmpe_gpio { 15 - compatible = "st,stmpe-gpio"; 16 - st,norequest-mask = <0x20>; //gpio 5 can't be used 17 - };
+53
Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: STMicroelectonics Port Expander (STMPE) GPIO Block 8 + 9 + description: 10 + STMicroelectronics Port Expander (STMPE) is a series of slow 11 + bus controllers for various expanded peripherals such as GPIO, keypad, 12 + touchscreen, ADC, PWM or rotator. It can contain one or several different 13 + peripherals connected to SPI or I2C. These bindings pertain to the 14 + GPIO portions of these expanders. 15 + 16 + maintainers: 17 + - Linus Walleij <linus.walleij@linaro.org> 18 + 19 + properties: 20 + compatible: 21 + const: st,stmpe-gpio 22 + 23 + "#gpio-cells": 24 + const: 2 25 + 26 + "#interrupt-cells": 27 + const: 2 28 + 29 + gpio-controller: true 30 + 31 + interrupt-controller: true 32 + 33 + st,norequest-mask: 34 + description: 35 + A bitmask of GPIO lines that cannot be requested because for 36 + for example not being connected to anything on the system 37 + $ref: /schemas/types.yaml#/definitions/uint32 38 + 39 + patternProperties: 40 + "^.+-hog(-[0-9]+)?$": 41 + type: object 42 + 43 + required: 44 + - gpio-hog 45 + 46 + additionalProperties: false 47 + 48 + required: 49 + - compatible 50 + - "#gpio-cells" 51 + - "#interrupt-cells" 52 + - gpio-controller 53 + - interrupt-controller