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: 3354 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1356697wrs; Mon, 17 Oct 2022 02:48:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7bWWIA+GIOfAHWbBisKDqMaGvwCUr47p8mF4TG9h8CSuBvx+u3ZYJXluZvv0q5dbb/4JZS X-Received: by 2002:a17:90b:2242:b0:20d:a2be:95a4 with SMTP id hk2-20020a17090b224200b0020da2be95a4mr12758527pjb.159.1666000096718; Mon, 17 Oct 2022 02:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666000096; cv=none; d=google.com; s=arc-20160816; b=fUiCk8AXv+fuS2VgFdxGW/Cx3QuHOmw7kjrOgW5i+b17/nfVurgakJAOjIAWwDUpBu 8zyFYECHiyyi+pAslBRIx8UucMBgdXKMHDOfOmGN6bEuYa2BTgo/NG7ToS/P6nvs3STl xEwpl0OfJgpZ128gTIWBgBzGpOy3KJyJZ2s0GUk/bd1TyFChEPJPWGVNQhKeJ5RyMtLj BVqSkhverkn7DxTI5Z8g1Ed/kExxKtaDogbiWbDrk1f1EmJglQy4JgzhqX/2rVGANr8h Sy8Lw2d9RBVBilIGk6hXqGshB7LZJ+aTx185S8uxIZQZjGJT00l7zieZcxTRPiScBtB6 owng== 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=5B2y+sKndDSQfGcgLhS+10QweGKjE1dYN1ycNWO2IKo=; b=iEqfkZaSXGkWFVUnD2zkiGe8JlzAVuvNi07izamjUDPVuupOylRyirg7dn4CQcLhUx onJupa1XSIazuWOuz20IfUgYBbB3cm+P1HC21BokYmAiYoSA9sza4Ffoq2piLW3XGrJI v1BGrRj6kebywfnRKwuFd46tDgONbF2jjEnoIORucPXNBnizdpWdrywICsGvxxEnt5Ku qolsNqNHoXf3jM592k8w9vl1ElJcs4GAkyO9LC2EkiLuBYuupd6XOJKvgEYJNFnsKvZE 5CxZ40eFRpTAbdaQSQojEPVvmNx8W7jmFZBTEX5vNohkD83yjSjjRAX306C9bh4IM+FB hwEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W+9Tjco/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020aa78dcf000000b005631dab9f69si10709863pfr.301.2022.10.17.02.48.03; Mon, 17 Oct 2022 02:48:16 -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="W+9Tjco/"; 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 S231510AbiJQJp5 (ORCPT + 99 others); Mon, 17 Oct 2022 05:45:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbiJQJpk (ORCPT ); Mon, 17 Oct 2022 05:45:40 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9158050716 for ; Mon, 17 Oct 2022 02:45:37 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id j7so17601925wrr.3 for ; Mon, 17 Oct 2022 02:45:37 -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=UBwHrUdy/OZ+eTHr/+vqmEMpkhZNxKKptuw/OwKw5eH3hpuyvEAgO5OewYZRugATJq onsRtKX3155swPdGJJnkkLdqifGN311BWvSj+eOZbTznj9KoivTpmDvSSq6TVAvoJ7Hi q57rNf4/QCp+HEnnLQwarQBwoFcjKY1t5YwsmmI0ooLNTD9chTFszZahtdtEHvgrKeHG ZurpRomvDhs/20gGkdJ9Orxu3YMbj5fvq/gnSt6YbnHFyImAJgDduTUlvv34u0q9Y5C9 NeFGozpJZHf4I9eDXPI2KCjz5+dwdg8MKir2Wn63cWZyRDnefzaVH7pSiyQGqkxH63jv dJsg== X-Gm-Message-State: ACrzQf1buVGTP0mLzVmhtVBKgVAXA3p+vGwtS461L0f7lK2SGearFsiC qoD7WHaG49vzvvmY2EdRXCqmkA== 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 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746927716963577737?= X-GMAIL-MSGID: =?utf-8?q?1746927716963577737?= 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: Rob Herring 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; - };