From patchwork Tue Jul 24 23:50:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 10543333 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ADCEA112B for ; Tue, 24 Jul 2018 23:50:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94FB029609 for ; Tue, 24 Jul 2018 23:50:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 875E52966F; Tue, 24 Jul 2018 23:50:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C4DA29609 for ; Tue, 24 Jul 2018 23:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388485AbeGYA7k (ORCPT ); Tue, 24 Jul 2018 20:59:40 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39310 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727673AbeGYA7k (ORCPT ); Tue, 24 Jul 2018 20:59:40 -0400 Received: by mail-pg1-f195.google.com with SMTP id g2-v6so3963726pgs.6 for ; Tue, 24 Jul 2018 16:50:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Exi7HMPcV1G1oRW8v/W+zZ9QH0uoOn9Qtr09/+QpU80=; b=cQj04j13pfeClVAo4Xu7wv73eOQvlpgaHjCyD77VMhAWh7/CufSe5sqfI9v6OLToF1 h5uIIcS3OSc9KLoRjMmNPeq02jkChKYubRMqJU4IiF0tN2N8BFMFSDWfxCAeS7zIse5W oclEtIlmJEodm16oeaYhKZAbFwUn721eMw8lUR0mucx+Tz9SZUj7HaDFOAX1FkQwDhM8 h6SwL5mjwFvEWOCnVraPYEZz1DeivQlvopRuCk20CZdIEVmL/U7VHzA5Tje2AQissVOv w+G5BoApBvR0wqOw6b95EOg6ubF0tg7OFX2JaAHGk/7ec1xSlxsCalZ1wZE88Ee523+q WcwQ== X-Gm-Message-State: AOUpUlGZsiNRu0cItI00xkUV/U0OSBosVcDyQ+b+evD6hJ7RBaDd33fT F34MSOdhw9/q5NF8dKfTChZ5Kg== X-Google-Smtp-Source: AAOMgpcfsX1qzT2g7KZbUa2Pud9l+KrxKXDHYDPtCYgfi0MfPYfKViSyJ7OoDtldHnml5YgoyzALAg== X-Received: by 2002:a62:e00a:: with SMTP id f10-v6mr19737599pfh.208.1532476245663; Tue, 24 Jul 2018 16:50:45 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:0:1000:1501:8e2d:4727:1211:622]) by smtp.gmail.com with ESMTPSA id x65-v6sm7788035pfk.140.2018.07.24.16.50.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 16:50:44 -0700 (PDT) From: Matthias Kaehlcke To: Zhang Rui , Eduardo Valentin , Rob Herring , Mark Rutland Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , Matthias Kaehlcke Subject: [PATCH] dt-bindings: thermal: qcom-spmi-temp-alarm: Improve thermal zone in example Date: Tue, 24 Jul 2018 16:50:35 -0700 Message-Id: <20180724235035.58146-1-mka@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The current example for a thermal zone isn't very useful as reference since it would result in a hardware shutdown at 145°C, instead of allowing the system to try to shutdown gracefully. Without an ADC channel a maximum of two trip points is useful in practice for this sensor, with temperatures corresponding to the stage 1 and stage 2 'hardware trip points'. A critical trip point at stage 2 may allow the system to shutdown before a hardware shutdown at stage 3 kicks in. It should be noted though that by default the chip performs a 'partial shutdown' when the temperature reaches stage 2, which may prevent an orderly shutdown. The 'partial shutdown' can be disabled by software. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- .../bindings/thermal/qcom-spmi-temp-alarm.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt b/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt index 290ec06fa33a..cabf813595e5 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt +++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt @@ -36,19 +36,14 @@ Example: thermal-sensors = <&pm8941_temp>; trips { - passive { - temperature = <1050000>; + stage1 { + temperature = <105000>; hysteresis = <2000>; type = "passive"; }; - alert { + stage2 { temperature = <125000>; hysteresis = <2000>; - type = "hot"; - }; - crit { - temperature = <145000>; - hysteresis = <2000>; type = "critical"; }; };