From patchwork Sun Aug 27 00:58:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 718485 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 1A4DDC83F1A for ; Sun, 27 Aug 2023 01:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbjH0BAC (ORCPT ); Sat, 26 Aug 2023 21:00:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229699AbjH0A73 (ORCPT ); Sat, 26 Aug 2023 20:59:29 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C968CD5 for ; Sat, 26 Aug 2023 17:59:25 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2bcb50e194dso31620611fa.3 for ; Sat, 26 Aug 2023 17:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693097964; x=1693702764; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uDJFiJgRqRQBXlrZBTgPGvpZ3gtef6On4wWBMux75So=; b=L56wIek9WQZnLUv3oYGrO4uW5T04O3r1D25l5m1ztTtg1h7GFpPedL0E+mXK/RTlxs LXtshIh6WkzWuWYp7hY3r8RjCIT5mZvzE8GP94/1mX9BcTt0c74mCHyG76hax8rxDgQ+ 1tCMzSDwco1HSJUByd7m9bwMx3xNQZpibpMu1tZQfDq0ENG/XTGuWYKI3cTxRtb7uYmw p7jdho2zti99I8Bwp/ZhIsX/ilH4WKSQmxYAqcyGE2Me/sT7MkL90xxLPHcX9qSs6dN4 CTv4+yG89NiorIK8ge4QHqNbLz35fXV/sW7yVBl1zWUZ+Az2uVdpUzxYlz2BgZZ8qTWE hEGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693097964; x=1693702764; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uDJFiJgRqRQBXlrZBTgPGvpZ3gtef6On4wWBMux75So=; b=Y+I87KOtsieY0WS7ZMtz5T1PPN0uQmIn8R3leB+5i9UzPbtEUVTRNGmjbhc9GE/X8j CRk5ZnnYql649ILd9XoqfQ6PeRRjB1Fm4DlEXa7TiCtLjwWCnw6nEKCg6Z24uwiLblqq Tp8mCdmSnrQaHAdJ9bobJ+ROb6u11DKkRqF9HCFmDz+Klc4ntWJv8f7xUw8zGqNMs7OG FrpzRZwjfLYleEf0Q1tUxL5eOHKlZL4cwwjgb/j4rQlDi5UBpAUyAKgeQLhwdueE7MND 3n660GvfDGZSKxy7sNe7CthnbANK82AzMmfMEFWFmo6ZW0oQVwjayFzeHVkGrZd2Wuf/ cTXg== X-Gm-Message-State: AOJu0YyQgebD8q3Z+wjQEZ1GQkCA9FyW0CzCTML5ugo/e+wt8+9fpGFv ++6MfXKPJ9EuGamT5jV+wFiZWA== X-Google-Smtp-Source: AGHT+IGL3pGTb39ODsV7CnBL0xCSeTkGEt0GiEBSOFcXRfEtuusBMbfVe6Y15RWyRk/MSYYY5UnHLw== X-Received: by 2002:a19:7b12:0:b0:4f6:2b25:194e with SMTP id w18-20020a197b12000000b004f62b25194emr12785143lfc.58.1693097963714; Sat, 26 Aug 2023 17:59:23 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id p18-20020ac246d2000000b00500a08e42e7sm917729lfo.124.2023.08.26.17.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Aug 2023 17:59:22 -0700 (PDT) From: Dmitry Baryshkov To: devicetree@vger.kernel.org, Lee Jones , Rob Herring , Krzysztof Kozlowski Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org, Pavel Machek , linux-leds@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v4 01/38] dt-bindings: input: qcom,pm8921-keypad: convert to YAML format Date: Sun, 27 Aug 2023 03:58:43 +0300 Message-Id: <20230827005920.898719-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230827005920.898719-1-dmitry.baryshkov@linaro.org> References: <20230827005920.898719-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Convert the bindings for the keypad subdevices of Qualcomm PM8921 and PM8058 PMICs from text to YAML format. While doing the conversion also drop the linux,keypad-no-autorepeat The property was never used by DT files. Both input and DT binding maintainers consider that bindings should switch to assertive (linux,autorepeat) instead of negating (no-autorepeat) property. Cc: Dmitry Torokhov Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- .../bindings/input/qcom,pm8921-keypad.yaml | 89 ++++++++++++++++++ .../bindings/input/qcom,pm8xxx-keypad.txt | 90 ------------------- 2 files changed, 89 insertions(+), 90 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml delete mode 100644 Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt diff --git a/Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml b/Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml new file mode 100644 index 000000000000..88764adcd696 --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/qcom,pm8921-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PM8921 PMIC KeyPad + +maintainers: + - Dmitry Baryshkov + +allOf: + - $ref: input.yaml# + - $ref: matrix-keymap.yaml# + +properties: + compatible: + enum: + - qcom,pm8058-keypad + - qcom,pm8921-keypad + + reg: + maxItems: 1 + + interrupts: + items: + - description: key sense + - description: key stuck + + wakeup-source: + type: boolean + description: use any event on keypad as wakeup event + + linux,keypad-wakeup: + type: boolean + deprecated: true + description: legacy version of the wakeup-source property + + debounce: + description: + Time in microseconds that key must be pressed or + released for state change interrupt to trigger. + $ref: /schemas/types.yaml#/definitions/uint32 + + scan-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: time in microseconds to pause between successive scans of the + matrix array + + row-hold: + $ref: /schemas/types.yaml#/definitions/uint32 + description: time in nanoseconds to pause between scans of each row in the + matrix array. + +required: + - compatible + - reg + - interrupts + - linux,keymap + +unevaluatedProperties: false + +examples: + - | + #include + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + + keypad@148 { + compatible = "qcom,pm8921-keypad"; + reg = <0x148>; + interrupt-parent = <&pmicintc>; + interrupts = <74 IRQ_TYPE_EDGE_RISING>, <75 IRQ_TYPE_EDGE_RISING>; + linux,keymap = < + MATRIX_KEY(0, 0, KEY_VOLUMEUP) + MATRIX_KEY(0, 1, KEY_VOLUMEDOWN) + MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS) + MATRIX_KEY(0, 3, KEY_CAMERA) + >; + keypad,num-rows = <1>; + keypad,num-columns = <5>; + debounce = <15>; + scan-delay = <32>; + row-hold = <91500>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt deleted file mode 100644 index 4a9dc6ba96b1..000000000000 --- a/Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt +++ /dev/null @@ -1,90 +0,0 @@ -Qualcomm PM8xxx PMIC Keypad - -PROPERTIES - -- compatible: - Usage: required - Value type: - Definition: must be one of: - "qcom,pm8058-keypad" - "qcom,pm8921-keypad" - -- reg: - Usage: required - Value type: - Definition: address of keypad control register - -- interrupts: - Usage: required - Value type: - Definition: the first interrupt specifies the key sense interrupt - and the second interrupt specifies the key stuck interrupt. - The format of the specifier is defined by the binding - document describing the node's interrupt parent. - -- linux,keymap: - Usage: required - Value type: - Definition: the linux keymap. More information can be found in - input/matrix-keymap.txt. - -- linux,keypad-no-autorepeat: - Usage: optional - Value type: - Definition: don't enable autorepeat feature. - -- wakeup-source: - Usage: optional - Value type: - Definition: use any event on keypad as wakeup event. - (Legacy property supported: "linux,keypad-wakeup") - -- keypad,num-rows: - Usage: required - Value type: - Definition: number of rows in the keymap. More information can be found - in input/matrix-keymap.txt. - -- keypad,num-columns: - Usage: required - Value type: - Definition: number of columns in the keymap. More information can be - found in input/matrix-keymap.txt. - -- debounce: - Usage: optional - Value type: - Definition: time in microseconds that key must be pressed or release - for key sense interrupt to trigger. - -- scan-delay: - Usage: optional - Value type: - Definition: time in microseconds to pause between successive scans - of the matrix array. - -- row-hold: - Usage: optional - Value type: - Definition: time in nanoseconds to pause between scans of each row in - the matrix array. - -EXAMPLE - - keypad@148 { - compatible = "qcom,pm8921-keypad"; - reg = <0x148>; - interrupt-parent = <&pmicintc>; - interrupts = <74 1>, <75 1>; - linux,keymap = < - MATRIX_KEY(0, 0, KEY_VOLUMEUP) - MATRIX_KEY(0, 1, KEY_VOLUMEDOWN) - MATRIX_KEY(0, 2, KEY_CAMERA_FOCUS) - MATRIX_KEY(0, 3, KEY_CAMERA) - >; - keypad,num-rows = <1>; - keypad,num-columns = <5>; - debounce = <15>; - scan-delay = <32>; - row-hold = <91500>; - };