Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2342938pxj; Mon, 10 May 2021 00:03:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4qu6VIoyVl5VJ0heE+FSJYy029Hu8zM+jwJDm4V90D/t9279jf0eTq9eHagpMopGZ+qpc X-Received: by 2002:a92:d684:: with SMTP id p4mr20823224iln.150.1620630186155; Mon, 10 May 2021 00:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620630186; cv=none; d=google.com; s=arc-20160816; b=n1w1Om8n6dUt/9ut1zaK5rKXSPgp0IFzHO7HzTG5kUZacSAIPuq3pvLrz0HutV0pqz I7MSYi1PuEeOTXSqpZG7lqsyjsnZZ/bmiRdL5qZ3mXVYooZFGlhwu3eGhfxJVTyQRgP0 ADZnjm21izgZeK01aaRqO7u6FU3fg1NOFSOHrwtR+XfdpNCyo7y90ertqtNFTi8mf8R1 0aRDmHDZBcfNThNnAvydux/XncSDbzl1T/a2jesjRQ+0AdKQ/ZvHcZLk3lG1s/Igx9uF r0Jx61WQb7tv4Dtc6NI8BhumYEXtJ1SHDAxRlFL4HtKazWWzOlAyBRufwKMjPlVqQyAS B8Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=XcDknuUZr0F0AwRcZeC/0ZTlP7AwjJGTPnXkmOpBAA8=; b=zB5X/2mqjYSKLI3O62kcduLR+47R8iH3SE0QtpITHHc6AO3r1OcpbEdbps94IHqdxG dBPhvacIONI2O7VB20A0A9Rjv9uQDuUhn4BC7jxdwp++T4h2Em93yNG8XYl92G4ckZ/o 2vcOV/fnL1d9D6DO3rnOs+TCkWUd9y55iN3JATQJWDGt9/rKl6N+LrpuCwX3sn2/RXxy BCNCCIK4yasT4EDEz9LXzJHypHw7CLDpMO1Ntoaa++oYuRN8m+b1mvJSuagvds3Ql2JF 6K0YjdcfYo4ARA1hL2ohDsF5bKmKedcL/P2p+ifLGePZfq+uQHaR0+Q4YchBXdG/B2Yy Em8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si14263825jat.48.2021.05.10.00.02.54; Mon, 10 May 2021 00:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbhEJHDN (ORCPT + 99 others); Mon, 10 May 2021 03:03:13 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:61793 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230071AbhEJHDJ (ORCPT ); Mon, 10 May 2021 03:03:09 -0400 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 10 May 2021 00:02:02 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 10 May 2021 00:02:00 -0700 X-QCInternal: smtphost Received: from c-skakit-linux.ap.qualcomm.com (HELO c-skakit-linux.qualcomm.com) ([10.242.51.242]) by ironmsg01-blr.qualcomm.com with ESMTP; 10 May 2021 12:31:20 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id C99414EF1; Mon, 10 May 2021 12:31:19 +0530 (IST) From: satya priya To: Dmitry Torokhov , Rob Herring , Sebastian Reichel , Andy Gross , Bjorn Andersson Cc: David Collins , kgunda@codeaurora.org, linux-input@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Courtney Cavin , Vinod Koul , Andy Yan , satya priya Subject: [PATCH V3 4/5] dt-bindings: input: pm8941-pwrkey: Convert pm8941 power key binding to yaml Date: Mon, 10 May 2021 12:31:03 +0530 Message-Id: <1620630064-16354-5-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620630064-16354-1-git-send-email-skakit@codeaurora.org> References: <1620630064-16354-1-git-send-email-skakit@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert qcom pm8941 power key binding from .txt to .yaml format. Signed-off-by: satya priya --- Changes in V2: - Fixed bot errors, took reference from input.yaml for "linux,code" - Added one complete example for powerkey and resin, and referenced it in main PON binding. - Moved this patch to the end of the series. Changes in V3: - Moved this patch before PON binding patch. - As per Rob's comments, added allOf at the beginning of binding. Added maxItems for interrupts. - Added 'unevaluatedProperties' instead of 'additionalProperties' as we are using allOf. .../bindings/input/qcom,pm8941-pwrkey.txt | 55 -------------- .../bindings/input/qcom,pm8941-pwrkey.yaml | 87 ++++++++++++++++++++++ 2 files changed, 87 insertions(+), 55 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt create mode 100644 Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt deleted file mode 100644 index 6cd08bc..0000000 --- a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt +++ /dev/null @@ -1,55 +0,0 @@ -Qualcomm PM8941 PMIC Power Key - -PROPERTIES - -- compatible: - Usage: required - Value type: - Definition: must be one of: - "qcom,pm8941-pwrkey" - "qcom,pm8941-resin" - "qcom,pmk8350-pwrkey" - "qcom,pmk8350-resin" - -- reg: - Usage: required - Value type: - Definition: base address of registers for block - -- interrupts: - Usage: required - Value type: - Definition: key change 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 released - for state change interrupt to trigger. - -- bias-pull-up: - Usage: optional - Value type: - Definition: presence of this property indicates that the KPDPWR_N pin - should be configured for pull up. - -- linux,code: - Usage: optional - Value type: - Definition: The input key-code associated with the power key. - Use the linux event codes defined in - include/dt-bindings/input/linux-event-codes.h - When property is omitted KEY_POWER is assumed. - -EXAMPLE - - pwrkey@800 { - compatible = "qcom,pm8941-pwrkey"; - reg = <0x800>; - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; - linux,code = ; - }; diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml new file mode 100644 index 0000000..0736fa3 --- /dev/null +++ b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/qcom,pm8941-pwrkey.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PM8941 PMIC Power Key + +maintainers: + - Courtney Cavin + - Vinod Koul + +allOf: + - $ref: input.yaml# + +properties: + compatible: + enum: + - qcom,pm8941-pwrkey + - qcom,pm8941-resin + - qcom,pmk8350-pwrkey + - qcom,pmk8350-resin + + interrupts: + maxItems: 1 + + debounce: + description: | + Time in microseconds that key must be pressed or + released for state change interrupt to trigger. + $ref: /schemas/types.yaml#/definitions/uint32 + + bias-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 + + linux,code: + description: | + The input key-code associated with the power key. + Use the linux event codes defined in + include/dt-bindings/input/linux-event-codes.h + When property is omitted KEY_POWER is assumed. + +required: + - compatible + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + spmi_bus: spmi@c440000 { + reg = <0x0c440000 0x1100>; + #address-cells = <2>; + #size-cells = <0>; + pmk8350: pmic@0 { + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + pmk8350_pon: pon_hlos@1300 { + reg = <0x1300>; + compatible = "qcom,pm8998-pon"; + + pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + + resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + }; + }; + }; +... -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation