From patchwork Mon Oct 17 09:45:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 616307 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 AD987C433FE for ; Mon, 17 Oct 2022 09:45:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231494AbiJQJpu (ORCPT ); Mon, 17 Oct 2022 05:45:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231462AbiJQJpm (ORCPT ); Mon, 17 Oct 2022 05:45:42 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3F134F6AA for ; Mon, 17 Oct 2022 02:45:36 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id r13so17566147wrj.11 for ; Mon, 17 Oct 2022 02:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=5B2y+sKndDSQfGcgLhS+10QweGKjE1dYN1ycNWO2IKo=; b=W+9Tjco/FlSwNeCm9bm+6WaQvn1hw5Oz08sH6n0XEk77QzOsdf0CzXOXryNDbLbGNl TL3Qfh36BDOEDInDmacLjlR2rolkd+jaangXT8EO7H/3eKZ5H+jzDSV8k4z5j01snjUo HbtbTssFUlDTh5X8W4Wmqq8389myQmeTVAMuzdG7ZWTRCn5srpoD+tzj234I9bTq1cKV hUb0SoX1VsbwBEjxMp8Z5fKrcY8E/RotJ7Orr14ACqAIe4xVwQsjO1DW8j9vFrf9cEnM 14KmarnmMNWK/Ze2O2elnts6klM0ygK3rZdilSp4E5tc6f/pfIrPsdSEPzKZQ3Sy4o6O OZ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5B2y+sKndDSQfGcgLhS+10QweGKjE1dYN1ycNWO2IKo=; b=EaOccxE031Hmhm9gD1/lYYMCeu5JYaz6U0Av7nn7M9WeUeceQNbGw++ebb6HGZPOLF lytYssFfWE9wKQ260CL/GwX30zYz53pjF3ByQ7R/8tvBR7TO1Q6H6SfifG7mht0MJrj5 JmMIJvmIkdmYUUE+jIGk6NejyfGdiKC1GB97YuN0dO+rTGJwIIMn1acAa1vWXTI6pQvF X6AEmlwyEEpffMqzSY+QbnQl3aLSaXjv37mhR0H70U1PmvuGQC+oL5QFtwfRpQ/nVFTs uLzhIJ4zywnt9ElxrXuSs0dxMG4QwoH/7VKa7eksFOT3ayrxGJwJNxQ72D9UHKqwBXKg eCTw== X-Gm-Message-State: ACrzQf1egmrE/CR00dNsRLlC2tkkASBfpbcGXc2Rco8W6761ZH3upoNz VETom45xfjCkC+C6AWWN7qsPQQ== X-Google-Smtp-Source: AMsMyM5JUQ4bgd7o8Kw7tQCxq+3XhMEWhqa5FuQfr8bZVFDEOEZLfPQnmAzJmqItGpwUtrfcJiJ6dw== X-Received: by 2002:a5d:47a8:0:b0:231:ca77:ac57 with SMTP id 8-20020a5d47a8000000b00231ca77ac57mr5564756wrb.384.1665999934759; Mon, 17 Oct 2022 02:45:34 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id d12-20020adfa40c000000b0022ca921dc67sm7824305wra.88.2022.10.17.02.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 02:45:34 -0700 (PDT) From: Neil Armstrong Date: Mon, 17 Oct 2022 11:45:31 +0200 Subject: [PATCH v3 06/11] dt-bindings: input: qcom,pm8921-pwrkey: convert to dt-schema MIME-Version: 1.0 Message-Id: <20220928-mdm9615-dt-schema-fixes-v3-6-531da552c354@linaro.org> References: <20220928-mdm9615-dt-schema-fixes-v3-0-531da552c354@linaro.org> In-Reply-To: <20220928-mdm9615-dt-schema-fixes-v3-0-531da552c354@linaro.org> To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Satya Priya , Lee Jones , Krzysztof Kozlowski , Andy Gross , Dmitry Torokhov , Bjorn Andersson , Konrad Dybcio Cc: linux-rtc@vger.kernel.org, Neil Armstrong , linux-kernel@vger.kernel.org, Bjorn Andersson , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-input@vger.kernel.org X-Mailer: b4 0.10.1 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Convert input/qcom,pm8xxx-pwrkey.txt to YAML, and take in account that the PM8921 pwrkey compatible is used as fallback for the PM8018 pwrkey. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski --- .../bindings/input/qcom,pm8921-pwrkey.yaml | 75 ++++++++++++++++++++++ .../bindings/input/qcom,pm8xxx-pwrkey.txt | 46 ------------- 2 files changed, 75 insertions(+), 46 deletions(-) diff --git a/Documentation/devicetree/bindings/input/qcom,pm8921-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8921-pwrkey.yaml new file mode 100644 index 000000000000..9591f77aa22a --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8921-pwrkey.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/qcom,pm8921-pwrkey.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PM8921 PMIC Power Key + +maintainers: + - Bjorn Andersson + +allOf: + - $ref: input.yaml# + +properties: + compatible: + oneOf: + - enum: + - qcom,pm8921-pwrkey + - qcom,pm8058-pwrkey + - items: + - enum: + - qcom,pm8018-pwrkey + - const: qcom,pm8921-pwrkey + + reg: + maxItems: 1 + + interrupts: + items: + - description: key release + - description: key press + + debounce: + description: | + Time in microseconds that key must be pressed or + released for state change interrupt to trigger. + $ref: /schemas/types.yaml#/definitions/uint32 + + pull-up: + description: | + Presence of this property indicates that the KPDPWR_N + pin should be configured for pull up. + $ref: /schemas/types.yaml#/definitions/flag + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + ssbi { + #address-cells = <1>; + #size-cells = <0>; + + pmic@0 { + reg = <0x0>; + #address-cells = <1>; + #size-cells = <0>; + + pwrkey@1c { + compatible = "qcom,pm8921-pwrkey"; + reg = <0x1c>; + interrupt-parent = <&pmicint>; + interrupts = <50 IRQ_TYPE_EDGE_RISING>, <51 IRQ_TYPE_EDGE_RISING>; + debounce = <15625>; + pull-up; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt deleted file mode 100644 index 588536cc96ed..000000000000 --- a/Documentation/devicetree/bindings/input/qcom,pm8xxx-pwrkey.txt +++ /dev/null @@ -1,46 +0,0 @@ -Qualcomm PM8xxx PMIC Power Key - -PROPERTIES - -- compatible: - Usage: required - Value type: - Definition: must be one of: - "qcom,pm8058-pwrkey" - "qcom,pm8921-pwrkey" - -- reg: - Usage: required - Value type: - Definition: address of power key control register - -- interrupts: - Usage: required - Value type: - Definition: the first interrupt specifies the key release interrupt - and the second interrupt specifies the key press interrupt. - The format of the specifier is defined by the binding - document describing the node's interrupt parent. - -- debounce: - Usage: optional - Value type: - Definition: time in microseconds that key must be pressed or release - for state change interrupt to trigger. - -- pull-up: - Usage: optional - Value type: - Definition: presence of this property indicates that the KPDPWR_N pin - should be configured for pull up. - -EXAMPLE - - pwrkey@1c { - compatible = "qcom,pm8921-pwrkey"; - reg = <0x1c>; - interrupt-parent = <&pmicintc>; - interrupts = <50 1>, <51 1>; - debounce = <15625>; - pull-up; - };