Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2308930rwi; Fri, 21 Oct 2022 02:15:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7AH6b/YCg/R8Tl69WXEP+0vlQwm+BOF0mXoNxmAb/2xdisj7R6be3iLPZpPIJs2XU0zVBV X-Received: by 2002:a63:d241:0:b0:43c:474c:c6c6 with SMTP id t1-20020a63d241000000b0043c474cc6c6mr15624451pgi.523.1666343748818; Fri, 21 Oct 2022 02:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666343748; cv=none; d=google.com; s=arc-20160816; b=iaO4h7RXdeMKD6eW4F/P/L+9KveIiulu5tLBKYb+JtPQ5SPP88fmZXTdrFR1YwnjL9 vC1sOiDIcfIkF/WK3rO9YBJkUiWCZkRcLhbGF7ud9bXb0JCLvSmJSGW030/cZAytonwq oUl2XNYxk2lx0EUBrKadhzIiIT8EZ4WcoKEFVNlV8nUv6EBhFZCERiBV7X2tJFC+wSe6 u0kCANWHbW4jYYOxRomNr+mw68fWofLz+1mXe65qqs4RAKQArpP8OdGhPYByPZf6iXG4 i5IhHo4nV8U4fkC794LfHTWEa0QazVBlgFTOx2ovTFkv8wjv+MJyEEbuPl6YrL0qTWSE sZvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=+bmpdylSa1sCy8CqzpRBiwfPofyXUjj2ucEcBN7svr0=; b=qnjiCWvJX/cX/0fRl49PtBFmfp+z1rzDGDwQxiYeQ0VITcv+ba/39forFpz/8oFzxB XArkJltgSLWQsOO0plGLTal9w/MJZBnGzmRW2Z7rgcmmYZQ1jNwLDXq0uzknB60Mbjxn o7az+9nUlUR6KsGE1jhqTyL8ihNVHHaW2IOUP33T+QPrcOo3856bIuAfynvEvq0C/rPP rlGNwQd+5TtKAUb2N3zZi7xggxHLbtlo/zQ5V8qXXwFwEK3aC48fvvcT5EbYf8EMQBYX haqu3ysIX1OhM7+8DWHdE5BMvF1ovEBqSnfEAL1o4CaG3uMu3RKA6K3TGVK6lj4ybOHQ SnDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p8sK2G9D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10-20020a65484a000000b00457dc916cd8si24733942pgs.152.2022.10.21.02.15.37; Fri, 21 Oct 2022 02:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p8sK2G9D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231211AbiJUJJd (ORCPT + 99 others); Fri, 21 Oct 2022 05:09:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231144AbiJUJI6 (ORCPT ); Fri, 21 Oct 2022 05:08:58 -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 50EC51A3E13 for ; Fri, 21 Oct 2022 02:08:56 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id bu30so3813222wrb.8 for ; Fri, 21 Oct 2022 02:08:55 -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=+bmpdylSa1sCy8CqzpRBiwfPofyXUjj2ucEcBN7svr0=; b=p8sK2G9D3ocfVsbCOVy+pUyyryGnPjWOUTja0RQ3u4t+E18YB3GqWBcdGEetM9uIgR jCmBS8IAfwMfHpUylIPDelF0weXl/Km68WCibqLaeZ+CVNVuyIAmRLbtQS4BTwUlD/zR kdBhVEmqc4bTfQF4jdvr30rlsBQ7HaIwMJGmWnbzvtqjfyi+K8KTAvWcn04WcizUFfpe g9OxR2WlB/JYIsAIv+/FRGyfFcxJPXrhzJ+F5eT3C2k1E55dXTV7QeYSZefO7beEm8w5 TscpJOmuuLVZI35QJCGCBPM3Sul+R5TC7BZCj702RYsFNdyAKLz0bABIUzPZlteX8zAL KGvg== 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=+bmpdylSa1sCy8CqzpRBiwfPofyXUjj2ucEcBN7svr0=; b=chiBo6vjW2vrJ/CXnyct9oppkv06mOTNHZTA5e1FMmnV8U8FBXkIIrpEu5MS75GbN6 38qgLYgq5INmaAhPFviAVj48bH6wBZliw5ukRpIO7iOdydNpQuKikR686WhE+pfxsvUe 5PTmLLjZI8459+XL4aSlNkADNxpJbNbvaqqJc5Ta12HESaslqipvR8s9Dc9pgOwk9RVn RN2OalT6tlYOD19Fcd9pq5ejuY3YYbWdU2z9k5Qvev+RTaDXlCpa0bk3w9JMfCVXkMiQ RehuyRxsOpMcJI8lJ1BT2bCbGm62VieCq8UIFUkTSXqeHTwFmTgR3FUB7gAK3C15MzjO vZiw== X-Gm-Message-State: ACrzQf2hHmKxVgqG5896tteptm520WJ2YbyBNLnJu+4BSO89cdA0vTSP scJxZHtEieEN2ZH72pK7fxXNQA== X-Received: by 2002:adf:fc10:0:b0:22e:55e5:9bb5 with SMTP id i16-20020adffc10000000b0022e55e59bb5mr11487698wrr.112.1666343334296; Fri, 21 Oct 2022 02:08:54 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:8261:5fff:fe11:bdda]) by smtp.gmail.com with ESMTPSA id v10-20020a05600c444a00b003c6f27d275dsm2230286wmn.33.2022.10.21.02.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 02:08:53 -0700 (PDT) From: Neil Armstrong Date: Fri, 21 Oct 2022 11:06:42 +0200 Subject: [PATCH v4 06/11] dt-bindings: input: qcom,pm8921-pwrkey: convert to dt-schema MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20220928-mdm9615-dt-schema-fixes-v4-6-dac2dfaac703@linaro.org> References: <20220928-mdm9615-dt-schema-fixes-v4-0-dac2dfaac703@linaro.org> In-Reply-To: <20220928-mdm9615-dt-schema-fixes-v4-0-dac2dfaac703@linaro.org> To: Bjorn Andersson , Satya Priya , Lee Jones , Krzysztof Kozlowski , Rob Herring , Konrad Dybcio , Dmitry Torokhov , Alexandre Belloni , Andy Gross , Alessandro Zummo Cc: Bjorn Andersson , linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, Neil Armstrong , Rob Herring , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.10.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Reviewed-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong --- .../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..12c74c083258 --- /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; - }; -- b4 0.10.1