From patchwork Fri May 22 11:46:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manaf Meethalavalappu Pallikunhi X-Patchwork-Id: 11565403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 365C613B1 for ; Fri, 22 May 2020 11:46:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 209962072C for ; Fri, 22 May 2020 11:46:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="p6CH+vCK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729828AbgEVLq5 (ORCPT ); Fri, 22 May 2020 07:46:57 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:32360 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729760AbgEVLqz (ORCPT ); Fri, 22 May 2020 07:46:55 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590148015; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=ioG91ONt67Thh3+++IhEIy7PrY5ruyU1b97zWmsYRzM=; b=p6CH+vCKg2F7wQe5ICgrpKKcWyCSEMjdlQOJFegJGDh1lMLqiJnMBcRwdAO3J5UWnytnJfgr ZF9q9hLfSc3Lk7Zyc1lEaBn51RxGlgkpd9bQVAk6umhkNqRwos646CcQ0FbJ88ZlfUAPqQK2 Ne5TOFaK28eOYW8NVWCP0O071p0= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5ec7bbae.7f14944eb570-smtp-out-n01; Fri, 22 May 2020 11:46:54 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 96367C43395; Fri, 22 May 2020 11:46:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from codeaurora.org (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: manafm) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9DD86C433C6; Fri, 22 May 2020 11:46:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9DD86C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=manafm@codeaurora.org From: Manaf Meethalavalappu Pallikunhi To: Amit Kucheria , Andy Gross , Bjorn Andersson , Zhang Rui , Daniel Lezcano , Rob Herring Cc: linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Manaf Meethalavalappu Pallikunhi Subject: [PATCH v3 2/2] dt-bindings: thermal: tsens: Add cold interrupt support in yaml Date: Fri, 22 May 2020 17:16:26 +0530 Message-Id: <20200522114626.28834-3-manafm@codeaurora.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200522114626.28834-1-manafm@codeaurora.org> References: <20200522114626.28834-1-manafm@codeaurora.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add cold interrupt support for tsens in yaml. Signed-off-by: Manaf Meethalavalappu Pallikunhi Reviewed-by: Rob Herring --- .../bindings/thermal/qcom-tsens.yaml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml index 2ddd39d96766..3592322fe172 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml @@ -52,12 +52,14 @@ properties: items: - description: Combined interrupt if upper or lower threshold crossed - description: Interrupt if critical threshold crossed + - description: Interrupt if cold threshold is crossed interrupt-names: minItems: 1 items: - const: uplow - const: critical + - const: cold nvmem-cells: minItems: 1 @@ -109,8 +111,10 @@ allOf: properties: interrupts: minItems: 2 + maxItems: 3 interrupt-names: minItems: 2 + maxItems: 3 required: - compatible @@ -174,4 +178,42 @@ examples: #qcom,sensors = <13>; #thermal-sensor-cells = <1>; }; + + - | + #include + // Example 4 (for any platform containing v2.6+ of the TSENS IP) + // (with thermal-zone): + tsens4: thermal-sensor@c265000 { + compatible = "qcom,sc7180-tsens", "qcom,tsens-v2"; + reg = <0xc265000 0x1ff>, + <0xc223000 0x1ff>; + + interrupts = , + , + ; + interrupt-names = "uplow", "critical", "cold"; + + #qcom,sensors = <15>; + #thermal-sensor-cells = <1>; + }; + + thermal-zones { + cold_thermal: cold-thermal { + polling-delay-passive = <0>; + polling-delay = <0>; + + thermal-sensors = <&tsens4 128>; + + trips { + cold-trip { + temperature = <1>; + hysteresis = <1>; + type = "passive"; + }; + }; + + cooling-maps { + }; + }; + }; ...