From dca669354e6ff494222dfc461bed1087264f3755 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 28 Feb 2022 15:38:02 -0600 Subject: dt-bindings: Another pass removing cases of 'allOf' containing a '$ref' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Another pass at removing unnecessary use of 'allOf' with a '$ref'. json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords. Cc: Krzysztof Kozlowski Cc: Thierry Reding Cc: Sam Ravnborg Cc: Dmitry Torokhov Cc: Pavel Machek Cc: Guenter Roeck Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: "David S. Miller" Cc: Kishon Vijay Abraham I Cc: Sebastian Reichel Cc: Mathieu Poirier Signed-off-by: Rob Herring Acked-by: Mark Brown Reviewed-by: Greg Kroah-Hartman Acked-By: Vinod Koul Acked-by: Lee Jones Acked-by: Marek BehĂșn Acked-by: Miquel Raynal Reviewed-by: Laurent Pinchart Acked-by: Jakub Kicinski Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220228213802.1639658-1-robh@kernel.org --- Documentation/devicetree/bindings/input/adc-joystick.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml b/Documentation/devicetree/bindings/input/adc-joystick.yaml index 721878d5b7af..2ee04e03bc22 100644 --- a/Documentation/devicetree/bindings/input/adc-joystick.yaml +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml @@ -61,11 +61,10 @@ patternProperties: description: EV_ABS specific event code generated by the axis. abs-range: - allOf: - - $ref: /schemas/types.yaml#/definitions/uint32-array - - items: - - description: minimum value - - description: maximum value + $ref: /schemas/types.yaml#/definitions/uint32-array + items: + - description: minimum value + - description: maximum value description: > Minimum and maximum values produced by the axis. For an ABS_X axis this will be the left-most and right-most -- cgit From 644291ebecd1355363f4b7a39dc115828643b901 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 3 Dec 2021 14:58:26 +0100 Subject: dt-bindings: input: touchscreen: ilitek_ts_i2c: Absorb ili2xxx bindings While Linux uses a different driver, the Ilitek ILI210x/ILI2117/ILI2120/ILI251x touchscreen controller Device Tree binding documentation is very similar. - Drop the fixed reg value, as some controllers use a different address, - Make reset-gpios optional, as it is not always wired. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/0c5f06c9d262c1720b40d068b6eefe58ca406601.1638539806.git.geert+renesas@glider.be --- .../devicetree/bindings/input/ilitek,ili2xxx.txt | 27 ---------------------- .../bindings/input/touchscreen/ilitek_ts_i2c.yaml | 7 ++++-- 2 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt b/Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt deleted file mode 100644 index cdcaa3f52d25..000000000000 --- a/Documentation/devicetree/bindings/input/ilitek,ili2xxx.txt +++ /dev/null @@ -1,27 +0,0 @@ -Ilitek ILI210x/ILI2117/ILI2120/ILI251x touchscreen controller - -Required properties: -- compatible: - ilitek,ili210x for ILI210x - ilitek,ili2117 for ILI2117 - ilitek,ili2120 for ILI2120 - ilitek,ili251x for ILI251x - -- reg: The I2C address of the device - -- interrupts: The sink for the touchscreen's IRQ output - See ../interrupt-controller/interrupts.txt - -Optional properties for main touchpad device: - -- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low) - -Example: - - touchscreen@41 { - compatible = "ilitek,ili251x"; - reg = <0x41>; - interrupt-parent = <&gpio4>; - interrupts = <7 IRQ_TYPE_EDGE_FALLING>; - reset-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>; - }; diff --git a/Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml index a190e7baac31..9f7328999756 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/ilitek_ts_i2c.yaml @@ -15,6 +15,9 @@ allOf: properties: compatible: enum: + - ilitek,ili210x + - ilitek,ili2117 + - ilitek,ili2120 - ilitek,ili2130 - ilitek,ili2131 - ilitek,ili2132 @@ -22,11 +25,12 @@ properties: - ilitek,ili2322 - ilitek,ili2323 - ilitek,ili2326 + - ilitek,ili251x - ilitek,ili2520 - ilitek,ili2521 reg: - const: 0x41 + maxItems: 1 interrupts: maxItems: 1 @@ -50,7 +54,6 @@ required: - compatible - reg - interrupts - - reset-gpios examples: - | -- cgit From 4e71ed985389ce213003927cfa65c1352e70396c Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 19 May 2022 16:14:11 -0500 Subject: dt-bindings: Fix properties without any type Now that the schema tools can extract type information for all properties (in order to decode dtb files), finding properties missing any type definition is fairly trivial though not yet automated. Fix the various property schemas which are missing a type. Most of these tend to be device specific properties which don't have a vendor prefix. A vendor prefix is how we normally ensure a type is defined. Signed-off-by: Rob Herring Acked-by: Sam Ravnborg # for everything in .../bindings/display/ Acked-by: Mark Brown Acked-by: Peter Rosin Acked-by: Bartosz Golaszewski Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20220519211411.2200720-1-robh@kernel.org --- Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml index e8f137abb03c..aa61fe64be63 100644 --- a/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml +++ b/Documentation/devicetree/bindings/input/google,cros-ec-keyb.yaml @@ -31,6 +31,7 @@ properties: type: boolean function-row-physmap: + $ref: /schemas/types.yaml#/definitions/uint32-array minItems: 1 maxItems: 15 description: | -- cgit From 4fda8a2df83ab25d2870997ddff2a4f67aa734c0 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Fri, 27 May 2022 21:48:17 -0700 Subject: dt-bindings: input: use generic node names Devicetree specification expects nodes to have generic names, if possible, so replace custom ones with something generic. For gpio-keys, the more popular format is "key-xxx" instead of "xxx-key", so choose the first one. Signed-off-by: Krzysztof Kozlowski Acked-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220524093136.7980-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml | 4 ++-- Documentation/devicetree/bindings/input/gpio-keys.yaml | 4 ++-- Documentation/devicetree/bindings/input/iqs269a.yaml | 2 +- Documentation/devicetree/bindings/input/iqs626a.yaml | 2 +- Documentation/devicetree/bindings/input/microchip,cap11xx.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml index 878464f128dc..5139af287d3e 100644 --- a/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml +++ b/Documentation/devicetree/bindings/input/fsl,mpr121-touchkey.yaml @@ -57,7 +57,7 @@ examples: #address-cells = <1>; #size-cells = <0>; - mpr121@5a { + touchkey@5a { compatible = "fsl,mpr121-touchkey"; reg = <0x5a>; interrupt-parent = <&gpio1>; @@ -77,7 +77,7 @@ examples: #address-cells = <1>; #size-cells = <0>; - mpr121@5a { + touchkey@5a { compatible = "fsl,mpr121-touchkey"; reg = <0x5a>; poll-interval = <20>; diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml index 7fe1966ea28a..93f601c58984 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml @@ -127,13 +127,13 @@ examples: compatible = "gpio-keys"; autorepeat; - up { + key-up { label = "GPIO Key UP"; linux,code = <103>; gpios = <&gpio1 0 1>; }; - down { + key-down { label = "GPIO Key DOWN"; linux,code = <108>; interrupts = <1 IRQ_TYPE_EDGE_FALLING>; diff --git a/Documentation/devicetree/bindings/input/iqs269a.yaml b/Documentation/devicetree/bindings/input/iqs269a.yaml index 9c154e5e1a91..d84d69f5455d 100644 --- a/Documentation/devicetree/bindings/input/iqs269a.yaml +++ b/Documentation/devicetree/bindings/input/iqs269a.yaml @@ -475,7 +475,7 @@ examples: #address-cells = <1>; #size-cells = <0>; - iqs269a@44 { + touch@44 { #address-cells = <1>; #size-cells = <0>; diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml index 0cb736c541c9..dd727befe564 100644 --- a/Documentation/devicetree/bindings/input/iqs626a.yaml +++ b/Documentation/devicetree/bindings/input/iqs626a.yaml @@ -751,7 +751,7 @@ examples: #address-cells = <1>; #size-cells = <0>; - iqs626a@44 { + touch@44 { #address-cells = <1>; #size-cells = <0>; diff --git a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml index d5d6bced3148..96358b12f9b2 100644 --- a/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml +++ b/Documentation/devicetree/bindings/input/microchip,cap11xx.yaml @@ -112,7 +112,7 @@ examples: #address-cells = <1>; #size-cells = <0>; - cap1188@28 { + touch@28 { compatible = "microchip,cap1188"; interrupt-parent = <&gpio1>; interrupts = <0 0>; -- cgit From f5d2c1ed72c26152e6883ed67dc3004a39165098 Mon Sep 17 00:00:00 2001 From: Jeff LaBundy Date: Mon, 27 Jun 2022 15:15:46 -0700 Subject: dt-bindings: input: iqs7222: Remove support for RF filter The vendor has marked the RF filter enable control as reserved in the datasheet; remove it from the binding. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-8-jeff@labundy.com Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index a3a1e5a65306..6180f7ee2284 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -37,10 +37,6 @@ properties: device is temporarily held in hardware reset prior to initialization if this property is present. - azoteq,rf-filt-enable: - type: boolean - description: Enables the device's internal RF filter. - azoteq,max-counts: $ref: /schemas/types.yaml#/definitions/uint32 enum: [0, 1, 2, 3] -- cgit From 6cfb357851bd3ef0a48e14bccfb5ca6b8104ea61 Mon Sep 17 00:00:00 2001 From: Jeff LaBundy Date: Mon, 27 Jun 2022 15:16:00 -0700 Subject: dt-bindings: input: iqs7222: Correct bottom speed step size The bottom speed property is specified in steps of 1, not 4. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-9-jeff@labundy.com Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index 6180f7ee2284..c9c3a1e9bcae 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -533,9 +533,8 @@ patternProperties: azoteq,bottom-speed: $ref: /schemas/types.yaml#/definitions/uint32 - multipleOf: 4 minimum: 0 - maximum: 1020 + maximum: 255 description: Specifies the speed of movement after which coordinate filtering is linearly reduced. -- cgit From f0ea452715d72bc365d2b401ceb458f5ae82eeec Mon Sep 17 00:00:00 2001 From: Jeff LaBundy Date: Mon, 27 Jun 2022 15:16:15 -0700 Subject: dt-bindings: input: iqs7222: Extend slider-mapped GPIO to IQS7222C Although the IQS7222C does not offer slider gesture support, the press/release event can still be mapped to any of the IQS7222C's three GPIO pins. Update the binding to reflect this relationship. Fixes: 44dc42d254bf ("dt-bindings: input: Add bindings for Azoteq IQS7222A/B/C") Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220626072412.475211-10-jeff@labundy.com Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/input/azoteq,iqs7222.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index c9c3a1e9bcae..32d0d5190334 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -611,16 +611,15 @@ patternProperties: azoteq,gpio-select: $ref: /schemas/types.yaml#/definitions/uint32-array minItems: 1 - maxItems: 1 + maxItems: 3 items: minimum: 0 - maximum: 0 + maximum: 2 description: | - Specifies an individual GPIO mapped to a tap, swipe or flick - gesture as follows: + Specifies one or more GPIO mapped to the event as follows: 0: GPIO0 - 1: GPIO3 (reserved) - 2: GPIO4 (reserved) + 1: GPIO3 (IQS7222C only) + 2: GPIO4 (IQS7222C only) Note that although multiple events can be mapped to a single GPIO, they must all be of the same type (proximity, touch or @@ -705,6 +704,14 @@ allOf: multipleOf: 4 maximum: 1020 + patternProperties: + "^event-(press|tap|(swipe|flick)-(pos|neg))$": + properties: + azoteq,gpio-select: + maxItems: 1 + items: + maximum: 0 + else: patternProperties: "^channel-([0-9]|1[0-9])$": @@ -721,8 +728,6 @@ allOf: azoteq,gesture-dist: false - azoteq,gpio-select: false - required: - compatible - reg -- cgit From 625f829586ea96b93817bf675cc42990ab451a17 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Mon, 27 Jun 2022 18:32:22 -0700 Subject: dt-bindings: input: touchscreen: edt-ft5x06: add report-rate-hz It allows to change the M06/M12 default scan rate. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220621123937.1330389-2-dario.binacchi@amarulasolutions.com Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/input/touchscreen/edt-ft5x06.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml index 2e8da7470513..46bc8c028fe6 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.yaml @@ -85,6 +85,14 @@ properties: minimum: 0 maximum: 80 + report-rate-hz: + description: | + Allows setting the scan rate in Hertz. + M06 supports range from 30 to 140 Hz. + M12 supports range from 1 to 255 Hz. + minimum: 1 + maximum: 255 + touchscreen-size-x: true touchscreen-size-y: true touchscreen-fuzz-x: true -- cgit From 7d321ab297c9ea88f6ceab122e3ccc034b304ca1 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 8 Jun 2022 15:12:03 -0600 Subject: dt-bindings: input: Increase maximum keycode value to 0x2ff The maximum keycode value for Linux is 0x2ff, not 0xff. There's already users and examples with values greater than 0xff, but the schema is not yet applied in those cases. Signed-off-by: Rob Herring Reviewed-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220608211207.2058487-2-robh@kernel.org Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/input.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml index d41d8743aad4..43d2f299c332 100644 --- a/Documentation/devicetree/bindings/input/input.yaml +++ b/Documentation/devicetree/bindings/input/input.yaml @@ -21,7 +21,7 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32-array items: minimum: 0 - maximum: 0xff + maximum: 0x2ff poll-interval: description: Poll interval time in milliseconds. -- cgit From 8ac14d2c2d81f6a78539ce9670d9283b70a23bf8 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 8 Jun 2022 15:12:04 -0600 Subject: dt-bindings: input: Centralize 'linux,code' definition Multiple bindings use 'linux,code', but there is not a central definition and type. Add 'linux,code' to input.yaml and update all the users to use it. Signed-off-by: Rob Herring Acked-by: Samuel Holland Acked-by: Jeff LaBundy Acked-by: Artur Rojek Link: https://lore.kernel.org/r/20220608211207.2058487-3-robh@kernel.org Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/adc-joystick.yaml | 2 +- .../bindings/input/allwinner,sun4i-a10-lradc-keys.yaml | 5 ++--- .../devicetree/bindings/input/azoteq,iqs7222.yaml | 7 ++----- Documentation/devicetree/bindings/input/gpio-keys.yaml | 1 - Documentation/devicetree/bindings/input/input.yaml | 8 ++++++++ Documentation/devicetree/bindings/input/iqs269a.yaml | 15 ++++++--------- Documentation/devicetree/bindings/input/iqs626a.yaml | 5 ++--- Documentation/devicetree/bindings/input/iqs62x-keys.yaml | 5 ++--- .../devicetree/bindings/input/max77650-onkey.yaml | 8 ++++---- 9 files changed, 27 insertions(+), 29 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/adc-joystick.yaml b/Documentation/devicetree/bindings/input/adc-joystick.yaml index 2ee04e03bc22..64d961458ac7 100644 --- a/Documentation/devicetree/bindings/input/adc-joystick.yaml +++ b/Documentation/devicetree/bindings/input/adc-joystick.yaml @@ -45,6 +45,7 @@ additionalProperties: false patternProperties: "^axis@[0-9a-f]+$": type: object + $ref: input.yaml# description: > Represents a joystick axis bound to the given ADC channel. For each entry in the io-channels list, one axis subnode with a matching @@ -57,7 +58,6 @@ patternProperties: description: Index of an io-channels list entry bound to this axis. linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 description: EV_ABS specific event code generated by the axis. abs-range: diff --git a/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml b/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml index 3399fc288afb..9700dc468b25 100644 --- a/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml +++ b/Documentation/devicetree/bindings/input/allwinner,sun4i-a10-lradc-keys.yaml @@ -44,14 +44,13 @@ properties: patternProperties: "^button-[0-9]+$": type: object + $ref: input.yaml# properties: label: $ref: /schemas/types.yaml#/definitions/string description: Descriptive name of the key - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: Keycode to emit + linux,code: true channel: $ref: /schemas/types.yaml#/definitions/uint32 diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index 32d0d5190334..70df4b8ae9db 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -417,6 +417,7 @@ patternProperties: patternProperties: "^event-(prox|touch)$": type: object + $ref: input.yaml# description: Represents a proximity or touch event reported by the channel. @@ -463,11 +464,7 @@ patternProperties: The IQS7222B does not feature channel-specific timeouts; the time- out specified for any one channel applies to all channels. - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - Numeric key or switch code associated with the event. Specify - KEY_RESERVED (0) to opt out of event reporting. + linux,code: true linux,input-type: $ref: /schemas/types.yaml#/definitions/uint32 diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml index 93f601c58984..01a9a1c1244b 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml @@ -34,7 +34,6 @@ patternProperties: linux,code: description: Key / Axis code to emit. - $ref: /schemas/types.yaml#/definitions/uint32 linux,input-type: description: diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml index 43d2f299c332..e3701a0bc500 100644 --- a/Documentation/devicetree/bindings/input/input.yaml +++ b/Documentation/devicetree/bindings/input/input.yaml @@ -23,6 +23,14 @@ properties: minimum: 0 maximum: 0x2ff + linux,code: + description: + Specifies a single numeric keycode value to be used for reporting + button/switch events. Specify KEY_RESERVED (0) to opt out of event + reporting. + $ref: /schemas/types.yaml#/definitions/uint32 + maximum: 0x2ff + poll-interval: description: Poll interval time in milliseconds. $ref: /schemas/types.yaml#/definitions/uint32 diff --git a/Documentation/devicetree/bindings/input/iqs269a.yaml b/Documentation/devicetree/bindings/input/iqs269a.yaml index d84d69f5455d..3c430d38594f 100644 --- a/Documentation/devicetree/bindings/input/iqs269a.yaml +++ b/Documentation/devicetree/bindings/input/iqs269a.yaml @@ -370,6 +370,7 @@ patternProperties: patternProperties: "^event-prox(-alt)?$": type: object + $ref: input.yaml# description: Represents a proximity event reported by the channel in response to a decrease in counts. Node names suffixed with '-alt' instead corre- @@ -396,14 +397,13 @@ patternProperties: default: 10 description: Specifies the threshold for the event. - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: Numeric key or switch code associated with the event. + linux,code: true additionalProperties: false "^event-touch(-alt)?$": type: object + $ref: input.yaml# description: Represents a touch event reported by the channel. properties: @@ -421,14 +421,13 @@ patternProperties: default: 4 description: Specifies the hysteresis for the event. - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: Numeric key or switch code associated with the event. + linux,code: true additionalProperties: false "^event-deep(-alt)?$": type: object + $ref: input.yaml# description: Represents a deep-touch event reported by the channel. properties: @@ -446,9 +445,7 @@ patternProperties: default: 0 description: Specifies the hysteresis for the event. - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: Numeric key or switch code associated with the event. + linux,code: true additionalProperties: false diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml index dd727befe564..2c0e5ff78728 100644 --- a/Documentation/devicetree/bindings/input/iqs626a.yaml +++ b/Documentation/devicetree/bindings/input/iqs626a.yaml @@ -449,6 +449,7 @@ patternProperties: patternProperties: "^event-(prox|touch|deep)(-alt)?$": type: object + $ref: input.yaml# description: Represents a proximity, touch or deep-touch event reported by the channel in response to a decrease in counts. Node names suffixed with @@ -487,9 +488,7 @@ patternProperties: Specifies the hysteresis for the event (touch and deep-touch events only). - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: Numeric key or switch code associated with the event. + linux,code: true linux,input-type: $ref: /schemas/types.yaml#/definitions/uint32 diff --git a/Documentation/devicetree/bindings/input/iqs62x-keys.yaml b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml index 77fe3b545b35..e677e31fe8fe 100644 --- a/Documentation/devicetree/bindings/input/iqs62x-keys.yaml +++ b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml @@ -89,15 +89,14 @@ properties: patternProperties: "^hall-switch-(north|south)$": type: object + $ref: input.yaml# description: Represents north/south-field Hall-effect sensor touch or proximity events. Note that north/south-field orientation is reversed on the IQS620AXzCSR device due to its flip-chip package. properties: - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: Numeric switch code associated with the event. + linux,code: true azoteq,use-prox: $ref: /schemas/types.yaml#/definitions/flag diff --git a/Documentation/devicetree/bindings/input/max77650-onkey.yaml b/Documentation/devicetree/bindings/input/max77650-onkey.yaml index 3a2ad6ec64db..48edc0c8c1dd 100644 --- a/Documentation/devicetree/bindings/input/max77650-onkey.yaml +++ b/Documentation/devicetree/bindings/input/max77650-onkey.yaml @@ -16,15 +16,15 @@ description: | The onkey controller is represented as a sub-node of the PMIC node on the device tree. +allOf: + - $ref: input.yaml# + properties: compatible: const: maxim,max77650-onkey linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - The key-code to be reported when the key is pressed. Defaults - to KEY_POWER. + default: 116 # KEY_POWER maxim,onkey-slide: $ref: /schemas/types.yaml#/definitions/flag -- cgit From d853cec7306adcdbca807d458a6dcdded7a620ec Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 8 Jun 2022 15:12:05 -0600 Subject: dt-bindings: input: Use common 'linux,keycodes' definition The common input schema, input.yaml, already defines 'linux,keycodes' property. Update the users to use it. Signed-off-by: Rob Herring Acked-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220608211207.2058487-4-robh@kernel.org Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/iqs626a.yaml | 2 +- Documentation/devicetree/bindings/input/iqs62x-keys.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml index 2c0e5ff78728..1340dcc3186d 100644 --- a/Documentation/devicetree/bindings/input/iqs626a.yaml +++ b/Documentation/devicetree/bindings/input/iqs626a.yaml @@ -510,6 +510,7 @@ patternProperties: "^trackpad-3x[2-3]$": type: object + $ref: input.yaml# description: Represents all channels associated with the trackpad. The channels are collectively active if the trackpad is defined and inactive otherwise. @@ -678,7 +679,6 @@ patternProperties: Specifies the raw count filter strength during low-power mode. linux,keycodes: - $ref: /schemas/types.yaml#/definitions/uint32-array minItems: 1 maxItems: 6 description: | diff --git a/Documentation/devicetree/bindings/input/iqs62x-keys.yaml b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml index e677e31fe8fe..0aa951f0ab92 100644 --- a/Documentation/devicetree/bindings/input/iqs62x-keys.yaml +++ b/Documentation/devicetree/bindings/input/iqs62x-keys.yaml @@ -9,6 +9,9 @@ title: Azoteq IQS620A/621/622/624/625 Keys and Switches maintainers: - Jeff LaBundy +allOf: + - $ref: input.yaml# + description: | The Azoteq IQS620A, IQS621, IQS622, IQS624 and IQS625 multi-function sensors feature a variety of self-capacitive, mutual-inductive and Hall-effect sens- @@ -30,7 +33,6 @@ properties: - azoteq,iqs625-keys linux,keycodes: - $ref: /schemas/types.yaml#/definitions/uint32-array minItems: 1 maxItems: 16 description: | -- cgit From 75448ff73f5ecfdfa867cbd0bd2cecc71f950978 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 8 Jun 2022 15:12:06 -0600 Subject: dt-bindings: input: Centralize 'linux,input-type' definition Multiple bindings use 'linux,input-type', but there is not a central definition and type. Add 'linux,input-type' to input.yaml and update all the users to use it. Signed-off-by: Rob Herring Acked-by: Jeff LaBundy Link: https://lore.kernel.org/r/20220608211207.2058487-5-robh@kernel.org Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/input/azoteq,iqs7222.yaml | 1 - Documentation/devicetree/bindings/input/gpio-keys.yaml | 7 +------ Documentation/devicetree/bindings/input/input.yaml | 14 ++++++++++++++ Documentation/devicetree/bindings/input/iqs626a.yaml | 4 ---- 4 files changed, 15 insertions(+), 11 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index 70df4b8ae9db..aa41fa3bde7a 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -467,7 +467,6 @@ patternProperties: linux,code: true linux,input-type: - $ref: /schemas/types.yaml#/definitions/uint32 enum: [1, 5] default: 1 description: diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml index 01a9a1c1244b..645dfa1e0d07 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml @@ -36,12 +36,7 @@ patternProperties: description: Key / Axis code to emit. linux,input-type: - description: - Specify event type this button/key generates. If not specified defaults to - <1> == EV_KEY. - $ref: /schemas/types.yaml#/definitions/uint32 - - default: 1 + default: 1 # EV_KEY linux,input-value: description: | diff --git a/Documentation/devicetree/bindings/input/input.yaml b/Documentation/devicetree/bindings/input/input.yaml index e3701a0bc500..17512f4347fd 100644 --- a/Documentation/devicetree/bindings/input/input.yaml +++ b/Documentation/devicetree/bindings/input/input.yaml @@ -31,6 +31,17 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 maximum: 0x2ff + linux,input-type: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: + - 1 # EV_KEY + - 2 # EV_REL + - 3 # EV_ABS + - 5 # EV_SW + description: + Specifies whether the event is to be interpreted as a key, relative, + absolute, or switch. + poll-interval: description: Poll interval time in milliseconds. $ref: /schemas/types.yaml#/definitions/uint32 @@ -47,4 +58,7 @@ properties: reset automatically. Device with key pressed reset feature can specify this property. +dependencies: + linux,input-type: [ "linux,code" ] + additionalProperties: true diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml index 1340dcc3186d..7a27502095f3 100644 --- a/Documentation/devicetree/bindings/input/iqs626a.yaml +++ b/Documentation/devicetree/bindings/input/iqs626a.yaml @@ -491,16 +491,12 @@ patternProperties: linux,code: true linux,input-type: - $ref: /schemas/types.yaml#/definitions/uint32 enum: [1, 5] description: Specifies whether the event is to be interpreted as a key (1) or a switch (5). By default, Hall-channel events are interpreted as switches and all others are interpreted as keys. - dependencies: - linux,input-type: ["linux,code"] - additionalProperties: false dependencies: -- cgit From 538c64068bb4f212544325f292cd0abecc081cd0 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 8 Jun 2022 15:12:07 -0600 Subject: dt-bindings: input: Convert adc-keys to DT schema Convert the adc-keys binding to DT schema format. The old binding has 'label' as required, but it should never be required given it's just a human readable description. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220608211207.2058487-6-robh@kernel.org Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/input/adc-keys.txt | 67 -------------- .../devicetree/bindings/input/adc-keys.yaml | 103 +++++++++++++++++++++ 2 files changed, 103 insertions(+), 67 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/adc-keys.txt create mode 100644 Documentation/devicetree/bindings/input/adc-keys.yaml (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/adc-keys.txt b/Documentation/devicetree/bindings/input/adc-keys.txt deleted file mode 100644 index 6c8be6a9ace2..000000000000 --- a/Documentation/devicetree/bindings/input/adc-keys.txt +++ /dev/null @@ -1,67 +0,0 @@ -ADC attached resistor ladder buttons ------------------------------------- - -Required properties: - - compatible: "adc-keys" - - io-channels: Phandle to an ADC channel - - io-channel-names = "buttons"; - - keyup-threshold-microvolt: Voltage above or equal to which all the keys are - considered up. - -Optional properties: - - poll-interval: Poll interval time in milliseconds - - autorepeat: Boolean, Enable auto repeat feature of Linux input - subsystem. - -Each button (key) is represented as a sub-node of "adc-keys": - -Required subnode-properties: - - label: Descriptive name of the key. - - linux,code: Keycode to emit. - - press-threshold-microvolt: voltage above or equal to which this key is - considered pressed. - -No two values of press-threshold-microvolt may be the same. -All values of press-threshold-microvolt must be less than -keyup-threshold-microvolt. - -Example: - -#include - - adc-keys { - compatible = "adc-keys"; - io-channels = <&lradc 0>; - io-channel-names = "buttons"; - keyup-threshold-microvolt = <2000000>; - - button-up { - label = "Volume Up"; - linux,code = ; - press-threshold-microvolt = <1500000>; - }; - - button-down { - label = "Volume Down"; - linux,code = ; - press-threshold-microvolt = <1000000>; - }; - - button-enter { - label = "Enter"; - linux,code = ; - press-threshold-microvolt = <500000>; - }; - }; - -+--------------------------------+------------------------+ -| 2.000.000 <= value | no key pressed | -+--------------------------------+------------------------+ -| 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed | -+--------------------------------+------------------------+ -| 1.000.000 <= value < 1.500.000 | KEY_VOLUMEDOWN pressed | -+--------------------------------+------------------------+ -| 500.000 <= value < 1.000.000 | KEY_ENTER pressed | -+--------------------------------+------------------------+ -| value < 500.000 | no key pressed | -+--------------------------------+------------------------+ diff --git a/Documentation/devicetree/bindings/input/adc-keys.yaml b/Documentation/devicetree/bindings/input/adc-keys.yaml new file mode 100644 index 000000000000..7aa078dead37 --- /dev/null +++ b/Documentation/devicetree/bindings/input/adc-keys.yaml @@ -0,0 +1,103 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/adc-keys.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ADC attached resistor ladder buttons + +maintainers: + - Alexandre Belloni + +allOf: + - $ref: input.yaml# + +properties: + compatible: + const: adc-keys + + io-channels: + maxItems: 1 + + io-channel-names: + const: buttons + + keyup-threshold-microvolt: + description: + Voltage above or equal to which all the keys are considered up. + + poll-interval: true + autorepeat: true + +patternProperties: + '^button-': + type: object + $ref: input.yaml# + additionalProperties: false + description: + Each button (key) is represented as a sub-node. + + properties: + label: true + + linux,code: true + + press-threshold-microvolt: + description: + Voltage above or equal to which this key is considered pressed. No + two values of press-threshold-microvolt may be the same. All values + of press-threshold-microvolt must be less than + keyup-threshold-microvolt. + + required: + - linux,code + - press-threshold-microvolt + +required: + - compatible + - io-channels + - io-channel-names + - keyup-threshold-microvolt + +additionalProperties: false + +examples: + - | + #include + // +--------------------------------+------------------------+ + // | 2.000.000 <= value | no key pressed | + // +--------------------------------+------------------------+ + // | 1.500.000 <= value < 2.000.000 | KEY_VOLUMEUP pressed | + // +--------------------------------+------------------------+ + // | 1.000.000 <= value < 1.500.000 | KEY_VOLUMEDOWN pressed | + // +--------------------------------+------------------------+ + // | 500.000 <= value < 1.000.000 | KEY_ENTER pressed | + // +--------------------------------+------------------------+ + // | value < 500.000 | no key pressed | + // +--------------------------------+------------------------+ + + adc-keys { + compatible = "adc-keys"; + io-channels = <&lradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <2000000>; + + button-up { + label = "Volume Up"; + linux,code = ; + press-threshold-microvolt = <1500000>; + }; + + button-down { + label = "Volume Down"; + linux,code = ; + press-threshold-microvolt = <1000000>; + }; + + button-enter { + label = "Enter"; + linux,code = ; + press-threshold-microvolt = <500000>; + }; + }; +... -- cgit From 5eb5652250e489fdcb31b46cc898e5f848b96d05 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 5 Jul 2022 14:03:54 +0200 Subject: dt-bindings: input: gpio-keys: enforce node names to match all properties The gpio-keys DT schema matches all properties with a wide pattern and applies specific schema to children. This has drawback - all regular properties are also matched and are silently ignored, even if they are not described in schema. Basically this allows any non-object property to be present. Enforce specific naming pattern for children (keys) to narrow the pattern thus do not match other properties. This will require all children to be properly prefixed or suffixed (button, event, switch or key). Removal of "if:" within patternProperties causes drop of one indentation level, but there are no other changes in the affected block. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705120356.94876-2-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/input/gpio-keys.yaml | 157 ++++++++++----------- 1 file changed, 77 insertions(+), 80 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml index 645dfa1e0d07..27bb5c6ab8d9 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml @@ -16,86 +16,83 @@ properties: - gpio-keys-polled patternProperties: - ".*": - if: - type: object - then: - $ref: input.yaml# - - properties: - gpios: - maxItems: 1 - - interrupts: - maxItems: 1 - - label: - description: Descriptive name of the key. - - linux,code: - description: Key / Axis code to emit. - - linux,input-type: - default: 1 # EV_KEY - - linux,input-value: - description: | - If linux,input-type is EV_ABS or EV_REL then this - value is sent for events this button generates when pressed. - EV_ABS/EV_REL axis will generate an event with a value of 0 - when all buttons with linux,input-type == type and - linux,code == axis are released. This value is interpreted - as a signed 32 bit value, e.g. to make a button generate a - value of -1 use: - - linux,input-value = <0xffffffff>; /* -1 */ - - $ref: /schemas/types.yaml#/definitions/uint32 - - debounce-interval: - description: - Debouncing interval time in milliseconds. If not specified defaults to 5. - $ref: /schemas/types.yaml#/definitions/uint32 - - default: 5 - - wakeup-source: - description: Button can wake-up the system. - - wakeup-event-action: - description: | - Specifies whether the key should wake the system when asserted, when - deasserted, or both. This property is only valid for keys that wake up the - system (e.g., when the "wakeup-source" property is also provided). - - Supported values are defined in linux-event-codes.h: - - EV_ACT_ANY - both asserted and deasserted - EV_ACT_ASSERTED - asserted - EV_ACT_DEASSERTED - deasserted - $ref: /schemas/types.yaml#/definitions/uint32 - enum: [0, 1, 2] - - linux,can-disable: - description: - Indicates that button is connected to dedicated (not shared) interrupt - which can be disabled to suppress events from the button. - type: boolean - - required: - - linux,code - - anyOf: - - required: - - interrupts - - required: - - gpios - - dependencies: - wakeup-event-action: [ wakeup-source ] - linux,input-value: [ gpios ] - - unevaluatedProperties: false + "^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$": + $ref: input.yaml# + + properties: + gpios: + maxItems: 1 + + interrupts: + maxItems: 1 + + label: + description: Descriptive name of the key. + + linux,code: + description: Key / Axis code to emit. + + linux,input-type: + default: 1 # EV_KEY + + linux,input-value: + description: | + If linux,input-type is EV_ABS or EV_REL then this + value is sent for events this button generates when pressed. + EV_ABS/EV_REL axis will generate an event with a value of 0 + when all buttons with linux,input-type == type and + linux,code == axis are released. This value is interpreted + as a signed 32 bit value, e.g. to make a button generate a + value of -1 use: + + linux,input-value = <0xffffffff>; /* -1 */ + + $ref: /schemas/types.yaml#/definitions/uint32 + + debounce-interval: + description: + Debouncing interval time in milliseconds. If not specified defaults to 5. + $ref: /schemas/types.yaml#/definitions/uint32 + + default: 5 + + wakeup-source: + description: Button can wake-up the system. + + wakeup-event-action: + description: | + Specifies whether the key should wake the system when asserted, when + deasserted, or both. This property is only valid for keys that wake up the + system (e.g., when the "wakeup-source" property is also provided). + + Supported values are defined in linux-event-codes.h: + + EV_ACT_ANY - both asserted and deasserted + EV_ACT_ASSERTED - asserted + EV_ACT_DEASSERTED - deasserted + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 1, 2] + + linux,can-disable: + description: + Indicates that button is connected to dedicated (not shared) interrupt + which can be disabled to suppress events from the button. + type: boolean + + required: + - linux,code + + anyOf: + - required: + - interrupts + - required: + - gpios + + dependencies: + wakeup-event-action: [ wakeup-source ] + linux,input-value: [ gpios ] + + unevaluatedProperties: false if: properties: -- cgit From 005d4674ed3d3d5c1a4c288c2486c8e9949dbb01 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 5 Jul 2022 14:03:55 +0200 Subject: dt-bindings: input: gpio-keys: reference input.yaml and document properties The original text bindings documented "autorepeat" and "label" properties (in the device node, beside the nodes with keys). DTS use also poll-interval. Reference the input.yaml to get these top-level properties. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705120356.94876-3-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/input/gpio-keys.yaml | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml index 27bb5c6ab8d9..e722e681d237 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml @@ -15,6 +15,13 @@ properties: - gpio-keys - gpio-keys-polled + autorepeat: true + + label: + description: Name of entire device + + poll-interval: true + patternProperties: "^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$": $ref: input.yaml# @@ -94,19 +101,18 @@ patternProperties: unevaluatedProperties: false -if: - properties: - compatible: - const: gpio-keys-polled -then: - properties: - poll-interval: - description: - Poll interval time in milliseconds - $ref: /schemas/types.yaml#/definitions/uint32 - - required: - - poll-interval +allOf: + - $ref: input.yaml# + - if: + properties: + compatible: + const: gpio-keys-polled + then: + required: + - poll-interval + else: + properties: + poll-interval: false additionalProperties: false -- cgit From 42d3f278d504de99edca345cd0543081d725943b Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 5 Jul 2022 14:03:56 +0200 Subject: dt-bindings: input: gpio-keys: accept also interrupt-extended Each key device node might have interrupts-extended instead of interrupts property: fsl-ls1028a-kontron-sl28-var1.dtb: buttons0: power-button: 'anyOf' conditional failed, one must be fixed: 'interrupts' is a required property 'gpios' is a required property Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20220705120356.94876-4-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/gpio-keys.yaml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/gpio-keys.yaml b/Documentation/devicetree/bindings/input/gpio-keys.yaml index e722e681d237..17ac9dff7972 100644 --- a/Documentation/devicetree/bindings/input/gpio-keys.yaml +++ b/Documentation/devicetree/bindings/input/gpio-keys.yaml @@ -92,6 +92,8 @@ patternProperties: anyOf: - required: - interrupts + - required: + - interrupts-extended - required: - gpios -- cgit From 39636805cab2d46aa645f389f3fca8040afd4c4f Mon Sep 17 00:00:00 2001 From: Jeff LaBundy Date: Sat, 9 Jul 2022 21:47:13 -0500 Subject: dt-bindings: input: iqs7222: Use central 'linux,code' definition Channel events adopt the newly centralized 'linux,code' property; slider events should too. Fixes: 8ac14d2c2d81 ("dt-bindings: input: Centralize 'linux,code' definition") Signed-off-by: Jeff LaBundy Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220710024713.17275-1-jeff@labundy.com Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index aa41fa3bde7a..02e605fac408 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -566,14 +566,13 @@ patternProperties: patternProperties: "^event-(press|tap|(swipe|flick)-(pos|neg))$": type: object + $ref: input.yaml# description: Represents a press or gesture (IQS7222A only) event reported by the slider. properties: - linux,code: - $ref: /schemas/types.yaml#/definitions/uint32 - description: Numeric key code associated with the event. + linux,code: true azoteq,gesture-max-ms: multipleOf: 4 -- cgit From e4bb7fee188dab08b7e589fff7616716cdbd5c3b Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Thu, 28 Jul 2022 13:16:02 -0700 Subject: dt-bindings: input: ariel-pwrbutton: use spi-peripheral-props.yaml Instead of listing directly properties typical for SPI peripherals, reference the spi-peripheral-props.yaml schema. This allows using all properties typical for SPI-connected devices, even these which device bindings author did not tried yet. Remove the spi-* properties which now come via spi-peripheral-props.yaml schema, except for the cases when device schema adds some constraints like maximum frequency. While changing additionalProperties->unevaluatedProperties, put it in typical place, just before example DTS.a The binding references also input.yaml and lists explicitly allowed properties, thus here reference only spi-peripheral-props.yaml for purpose of documenting the SPI slave device and bringing spi-max-frequency type validation. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20220727164230.385614-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov --- Documentation/devicetree/bindings/input/ariel-pwrbutton.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation/devicetree/bindings/input') diff --git a/Documentation/devicetree/bindings/input/ariel-pwrbutton.yaml b/Documentation/devicetree/bindings/input/ariel-pwrbutton.yaml index b4ad829d7383..442f623bb294 100644 --- a/Documentation/devicetree/bindings/input/ariel-pwrbutton.yaml +++ b/Documentation/devicetree/bindings/input/ariel-pwrbutton.yaml @@ -17,6 +17,7 @@ description: | allOf: - $ref: input.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# properties: compatible: -- cgit