From patchwork Fri May 22 11:44:52 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: 11565391 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 05D3A739 for ; Fri, 22 May 2020 11:45:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E27FF2072C for ; Fri, 22 May 2020 11:45:56 +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="QlSEFDpI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728566AbgEVLps (ORCPT ); Fri, 22 May 2020 07:45:48 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:36637 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729326AbgEVLps (ORCPT ); Fri, 22 May 2020 07:45:48 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1590147947; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=ioG91ONt67Thh3+++IhEIy7PrY5ruyU1b97zWmsYRzM=; b=QlSEFDpIbDrynOR89qkRS+x/mV14oVxuo3iTqaEq5YtXPmFjJ9HCC+bgl9BMS/uR/i6+Didj ZIBR4tVt3JIW2PIkixgxcDEIHl+J9YxHwI031nUUUVOO9nwB/w6abnyMT2Sc1A1q49yXp086 aCbB2O8gQYGy1zolLY60Bokgf7o= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI5ZDFmMiIsICJsaW51eC1wbUB2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 5ec7bb56569a62550db49ba7 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 22 May 2020 11:45:26 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E15D4C433C6; Fri, 22 May 2020 11:45:25 +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 autolearn=ham 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 301F1C433CA; Fri, 22 May 2020 11:45:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 301F1C433CA 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:14:52 +0530 Message-Id: <20200522114452.28647-3-manafm@codeaurora.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200522114452.28647-1-manafm@codeaurora.org> References: <20200522114452.28647-1-manafm@codeaurora.org> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add cold interrupt support for tsens in yaml. Signed-off-by: Manaf Meethalavalappu Pallikunhi --- .../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 { + }; + }; + }; ...