From patchwork Wed Jun 8 21:12:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 579940 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B91DCCA47A for ; Wed, 8 Jun 2022 21:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235750AbiFHVMP (ORCPT ); Wed, 8 Jun 2022 17:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234821AbiFHVMO (ORCPT ); Wed, 8 Jun 2022 17:12:14 -0400 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDDC53DD444; Wed, 8 Jun 2022 14:12:13 -0700 (PDT) Received: by mail-io1-f48.google.com with SMTP id 19so934089iou.12; Wed, 08 Jun 2022 14:12:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7HaRWD8z4gtiDR+UJAlIS1Mths2quPGJl0a0O+AepzY=; b=qmQZB+VAtcqVJaA0zZ2zOAtjuI6o711He+7BQ9/QR4XnGiF4W7If+DEyHAQBR/8oKp qRZ4mjftufX7BkEDyTZmblV8kmLUZgDCWprfNF6wasOcv1E4/5MeoYozuAQ9Qs7UT6yP 1Eks9igWt+MnNzBu8KY5QMm17+WlxeeDDmYpwRFJeEoqq6NRsiZUxbsECcNmEC0Y55Wg GcfsEk4MnGtVO1IZnK9/JM88fwhzngeyy1MnfQJB5x7miYPixlAxUduc17sJ+iTTd0NM JofE3LGmBIEtX5ijbnYBkBpmaav/sK75rE4iaoY1GHWubnT2PfZ0qC6svLPX4/ZGyZZv oiRA== X-Gm-Message-State: AOAM530YIgce5boHcJXOQQUaEKyaSYYoYjSueswJj9mI/DCicv6/q/ul lg/n1tsfeZa/6ImaKDBT0A== X-Google-Smtp-Source: ABdhPJyXTLq+RexBvmNn5/tWEsemPYz8jExcg1hDInixdrgLysfL/1ZAdt6iK7KyNNsMuDw9WMeSIw== X-Received: by 2002:a05:6638:3474:b0:331:ca81:602a with SMTP id q52-20020a056638347400b00331ca81602amr6287186jav.88.1654722733159; Wed, 08 Jun 2022 14:12:13 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.251]) by smtp.googlemail.com with ESMTPSA id v11-20020a02cbab000000b00331bd537addsm3295264jap.102.2022.06.08.14.12.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 14:12:12 -0700 (PDT) From: Rob Herring To: Dmitry Torokhov , Krzysztof Kozlowski , Alexandre Belloni Cc: Heinrich Schuchardt , Hans de Goede , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Bartosz Golaszewski , Artur Rojek , Maxime Ripard , Jeff LaBundy , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] dt-bindings: input: Increase maximum keycode value to 0x2ff Date: Wed, 8 Jun 2022 15:12:03 -0600 Message-Id: <20220608211207.2058487-2-robh@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220608211207.2058487-1-robh@kernel.org> References: <20220608211207.2058487-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- Documentation/devicetree/bindings/input/input.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From patchwork Wed Jun 8 21:12:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 581008 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39E88C43334 for ; Wed, 8 Jun 2022 21:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235881AbiFHVMV (ORCPT ); Wed, 8 Jun 2022 17:12:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbiFHVMT (ORCPT ); Wed, 8 Jun 2022 17:12:19 -0400 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D10F3DEB60; Wed, 8 Jun 2022 14:12:16 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id y79so1707269iof.2; Wed, 08 Jun 2022 14:12:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T1cawpvk6T5EodVUg6iifiBSPNSIcr6LOGTYf0md8yw=; b=znctldVMHQ7L84N6oQnZaazney5BnrT3oMxNlnjZRMew9VIQb+bJ5xWja//6odV1g6 kZ1W6n0cWzwMyEOekw/IJ1IKRL3hTCvlBl9vk3F3HmP17WJhEDbSF+gTT0o+n1uoPOly ywYfsjl4Pj2EzAC+9P16HA241KKlJ/k5x548elnNhzlRW/O23KHJ2Bl9cx4m4DtBH67n K+wZI2Oa+SbE13Xh48mq2TJkOrlF8s+no5kiALA211Ap9XfrZZvrv4eS4iBT3XJXU3ir 1Cslf+eGKdtFA8Tb9vFohINSl1eHVmwWAcKs5kzBN7to9YrA2u3kruBMMYX5Astj62rP IZ9Q== X-Gm-Message-State: AOAM533JGIiCTvNBt+NnENQuhRQjc9zzjYJf/pc39UHF78tCZn4J+BpW EhZqITdh8YPoIEKPd0o43w== X-Google-Smtp-Source: ABdhPJz8JweMimbib7XFTTeIJs6gv1vdcpW9D8QjkC4FazxTImuhLjRpfjIMw2c69m+iViiIFrQGXw== X-Received: by 2002:a05:6638:1a92:b0:331:dc7a:1cd0 with SMTP id ce18-20020a0566381a9200b00331dc7a1cd0mr4155213jab.293.1654722735959; Wed, 08 Jun 2022 14:12:15 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.251]) by smtp.googlemail.com with ESMTPSA id v11-20020a02cbab000000b00331bd537addsm3295264jap.102.2022.06.08.14.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 14:12:15 -0700 (PDT) From: Rob Herring To: Dmitry Torokhov , Krzysztof Kozlowski , Alexandre Belloni Cc: Heinrich Schuchardt , Hans de Goede , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Bartosz Golaszewski , Artur Rojek , Maxime Ripard , Jeff LaBundy , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] dt-bindings: input: Centralize 'linux, code' definition Date: Wed, 8 Jun 2022 15:12:04 -0600 Message-Id: <20220608211207.2058487-3-robh@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220608211207.2058487-1-robh@kernel.org> References: <20220608211207.2058487-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- .../devicetree/bindings/input/adc-joystick.yaml | 2 +- .../input/allwinner,sun4i-a10-lradc-keys.yaml | 5 ++--- .../devicetree/bindings/input/azoteq,iqs7222.yaml | 7 ++----- .../devicetree/bindings/input/gpio-keys.yaml | 1 - .../devicetree/bindings/input/input.yaml | 8 ++++++++ .../devicetree/bindings/input/iqs269a.yaml | 15 ++++++--------- .../devicetree/bindings/input/iqs626a.yaml | 5 ++--- .../devicetree/bindings/input/iqs62x-keys.yaml | 5 ++--- .../devicetree/bindings/input/max77650-onkey.yaml | 8 ++++---- 9 files changed, 27 insertions(+), 29 deletions(-) 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 a3a1e5a65306..5ea10fe7ffe9 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -421,6 +421,7 @@ patternProperties: patternProperties: "^event-(prox|touch)$": type: object + $ref: input.yaml# description: Represents a proximity or touch event reported by the channel. @@ -467,11 +468,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 7fe1966ea28a..cd07107fd5ed 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 9c154e5e1a91..c22f8f27913a 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 0cb736c541c9..e645521da8ba 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 From patchwork Wed Jun 8 21:12:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 579939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AF61CCA47A for ; Wed, 8 Jun 2022 21:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233907AbiFHVMW (ORCPT ); Wed, 8 Jun 2022 17:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235870AbiFHVMU (ORCPT ); Wed, 8 Jun 2022 17:12:20 -0400 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDB853DF14B; Wed, 8 Jun 2022 14:12:18 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id q76so15042036iod.8; Wed, 08 Jun 2022 14:12:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UzwWuVv9AqTLWVtStbX2LS3E3fgHtoXib1oocMgrURQ=; b=F604PbYyNtTl89Am0wPO6CcE418aEGHzrc6WtFuNBNKagsc4wyBPfijZVnldHXKmDe m7aMFWiSt3RI7VWBm3SZ8PeN1X8NAR6F92RhHJMFpHTwn+OadVUWlug7huqyWoRKtheF KfyCyeN8ukxvcwlMCh2pNuRnOHvwLqt9huyH7cv2i2Ts7hOVN2r386Paxu/0BZnAHlWR 7/FvFwmyeDvCg9qZrtdxXJVk+8Bd8+8uk6NiJKUMrwvpxyr2TZqgUJLgkjF50WmEGUQn Dh/1Kc4qwcbtQKmIgWIuQxG9p411NS9xzeqJmEhOD8Hht076JBtbLdvNQBPlcXExHFIN tc3A== X-Gm-Message-State: AOAM533YpoaSaiue/AtQAEcnmcBogC/5VwvOo+HlOyS+XcFY9Do9EvER I4m9+UWHBx84+0TfnnoFBQ== X-Google-Smtp-Source: ABdhPJwpRj0zZiou8o8oWuNJqEjO6BbP/VHHHjZl9JpcxeVpWwMPbvZIW0VEVvdcaNttthsKMvQ4Uw== X-Received: by 2002:a05:6638:3289:b0:331:f7ff:b908 with SMTP id f9-20020a056638328900b00331f7ffb908mr1481718jav.48.1654722738100; Wed, 08 Jun 2022 14:12:18 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.251]) by smtp.googlemail.com with ESMTPSA id v11-20020a02cbab000000b00331bd537addsm3295264jap.102.2022.06.08.14.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 14:12:17 -0700 (PDT) From: Rob Herring To: Dmitry Torokhov , Krzysztof Kozlowski , Alexandre Belloni Cc: Heinrich Schuchardt , Hans de Goede , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Bartosz Golaszewski , Artur Rojek , Maxime Ripard , Jeff LaBundy , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] dt-bindings: input: Use common 'linux,keycodes' definition Date: Wed, 8 Jun 2022 15:12:05 -0600 Message-Id: <20220608211207.2058487-4-robh@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220608211207.2058487-1-robh@kernel.org> References: <20220608211207.2058487-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- Documentation/devicetree/bindings/input/iqs626a.yaml | 2 +- Documentation/devicetree/bindings/input/iqs62x-keys.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/input/iqs626a.yaml b/Documentation/devicetree/bindings/input/iqs626a.yaml index e645521da8ba..008959f2d425 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: | From patchwork Wed Jun 8 21:12:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 579938 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E424C433EF for ; Wed, 8 Jun 2022 21:12:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235921AbiFHVM2 (ORCPT ); Wed, 8 Jun 2022 17:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235788AbiFHVMV (ORCPT ); Wed, 8 Jun 2022 17:12:21 -0400 Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D27363DFC73; Wed, 8 Jun 2022 14:12:20 -0700 (PDT) Received: by mail-io1-f47.google.com with SMTP id d123so1293941iof.10; Wed, 08 Jun 2022 14:12:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AMhNLgb7YvQzjxicdIWro1Pk5lisZYU78DetdhihqKs=; b=AU0j1Nghrs+l7CJNwmhfg1BRGbdZYg8D2LeHtB+c/I14F9MJzD7fL9I7zf19cGizL1 2dhEQjON1GL4ilUWUtCgburY0e33hJH2anu581y6tdyAMlYpBtaWQInqHoODFRROwt2t 77thnUQU9RgUyXSpor8d5U5zKMqZgcc8Kp9kYwWN0D2+rUoDMiBUshxlH1urUXU/Fad0 WEkkC5kRYQnA3Ad8R1QuuVR47yuybsHpTOMJGETyNQDZP4rYDpvy/XGMP15Oa0sQm3Qi 2wj0lwbq6XOzhb/BzQk50R1ULAdsHXZHKwRC+TTWTWMQP3QS77/P+XYuAjAVpOL5I29k bdzQ== X-Gm-Message-State: AOAM533Ge2kF0JyOlNu8CcxoKh5k4m/yQzwHCQZfC7Qxqi5cGrvsPPNZ SfWwCQRmjeuOpyDbYZw8tg== X-Google-Smtp-Source: ABdhPJwmlUPv5v56FAmPATpFlhIHG63zJhWjtwMYeF3C0AI+A88YFyEy+LZKnWN7Lf7zRfBsEKp7Ow== X-Received: by 2002:a05:6638:264e:b0:32e:bc45:bff0 with SMTP id n14-20020a056638264e00b0032ebc45bff0mr20016342jat.282.1654722740108; Wed, 08 Jun 2022 14:12:20 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.251]) by smtp.googlemail.com with ESMTPSA id v11-20020a02cbab000000b00331bd537addsm3295264jap.102.2022.06.08.14.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 14:12:19 -0700 (PDT) From: Rob Herring To: Dmitry Torokhov , Krzysztof Kozlowski , Alexandre Belloni Cc: Heinrich Schuchardt , Hans de Goede , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Bartosz Golaszewski , Artur Rojek , Maxime Ripard , Jeff LaBundy , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/5] dt-bindings: input: Centralize 'linux,input-type' definition Date: Wed, 8 Jun 2022 15:12:06 -0600 Message-Id: <20220608211207.2058487-5-robh@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220608211207.2058487-1-robh@kernel.org> References: <20220608211207.2058487-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- .../devicetree/bindings/input/azoteq,iqs7222.yaml | 1 - .../devicetree/bindings/input/gpio-keys.yaml | 7 +------ Documentation/devicetree/bindings/input/input.yaml | 14 ++++++++++++++ .../devicetree/bindings/input/iqs626a.yaml | 4 ---- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml index 5ea10fe7ffe9..a13bd3e41dd3 100644 --- a/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml +++ b/Documentation/devicetree/bindings/input/azoteq,iqs7222.yaml @@ -471,7 +471,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 cd07107fd5ed..6b49b1afdd95 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 008959f2d425..4df27646c980 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: From patchwork Wed Jun 8 21:12:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 581007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 377DAC43334 for ; Wed, 8 Jun 2022 21:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235962AbiFHVM1 (ORCPT ); Wed, 8 Jun 2022 17:12:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235965AbiFHVMZ (ORCPT ); Wed, 8 Jun 2022 17:12:25 -0400 Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D793E2E90; Wed, 8 Jun 2022 14:12:23 -0700 (PDT) Received: by mail-io1-f51.google.com with SMTP id s26so10378699ioa.3; Wed, 08 Jun 2022 14:12:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V9sfEqVoExp6pZINUa/135mlrQ0MuzQ5O72MBn8Pd+A=; b=fHqxg5BzxzkZyFlb3t8zUEh/YQQ+iCywTpE66pUNJJaYrWabQp6ba9h8A2/zo8BQpl lir5eOilaw5jDMhyVPcUwNiZaLgfRWwOJjSY0Up48a6KBDsElI4toIeUwbgU1XFKZdmv 0Q002DVMou0OJtZhD8AyPYrhNGlW/oTjF/njfcBmas3WWjsj7Cjo1Aeh59gBC/BN2kMf FTve3Da8ub+guvmBplKPoHxl26iEB5+UqybkcoYrN2cEdv1I2ra2uDWKIIo5tglDeAyo T/IYTYo/+GVUHPKwJ81U1E/pU/5W+vHI0a5vICxPSs5hXkVW/5lZ5M0hK5p/nEQsZ1EK Xyog== X-Gm-Message-State: AOAM530xOXIO0zupBMpzyRXlPQ/9aQzKpuKJBJqSgj9zxLFW1+VCLSjj lwjmw/xLtLjkDPeiNothvQ== X-Google-Smtp-Source: ABdhPJwhK5OVFYFeBDh7VlomBBUzhO/WesMM0WGoy0nSyG3Wa5KcusS51b2RMEPThmKcdBXdtp7c4A== X-Received: by 2002:a02:aa92:0:b0:331:c856:fe69 with SMTP id u18-20020a02aa92000000b00331c856fe69mr6526812jai.187.1654722742525; Wed, 08 Jun 2022 14:12:22 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.251]) by smtp.googlemail.com with ESMTPSA id v11-20020a02cbab000000b00331bd537addsm3295264jap.102.2022.06.08.14.12.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 14:12:22 -0700 (PDT) From: Rob Herring To: Dmitry Torokhov , Krzysztof Kozlowski , Alexandre Belloni Cc: Heinrich Schuchardt , Hans de Goede , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Bartosz Golaszewski , Artur Rojek , Maxime Ripard , Jeff LaBundy , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/5] dt-bindings: input: Convert adc-keys to DT schema Date: Wed, 8 Jun 2022 15:12:07 -0600 Message-Id: <20220608211207.2058487-6-robh@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220608211207.2058487-1-robh@kernel.org> References: <20220608211207.2058487-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- v2: - Drop Heinrich as a maintainer - Use common linux,code definition - Drop label as required --- .../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 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>; + }; + }; +...