Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8759325rwi; Tue, 25 Oct 2022 10:24:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5lmwPJuNCPJytONfA13xslSfP1a14+bjkBqo/1+mbz3eqO1K25/6LAsvP5/udIiRz4TetJ X-Received: by 2002:a17:907:980e:b0:78d:b6d5:661e with SMTP id ji14-20020a170907980e00b0078db6d5661emr33653718ejc.46.1666718672243; Tue, 25 Oct 2022 10:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666718672; cv=none; d=google.com; s=arc-20160816; b=eJOuc5rUUJuCRw7mV3pqG7f8BKwYOJJOL6hN8fY/c97mBYkIucooqGtxLsrDMltWjF PTpdpFUm6kvDOh8K1/hVbCLeOjnztROxsNbZhE9WnQu0V5c8K7qzLzmE6damgiyWETv8 0dUxVkqnpHCMU18z4E5BUZcfH+M3QNMpolx9zmp9ieTBsPdahMmX5Cq5WhQnMxkJEJgM xuUHCk9RggSux5aIVK9C2eqFMpkyvyleGlo/G/0Anyn7D9lkNzcbMFtHduvvbfIOAI4T IL0XGjLcJ7ta0LuLn+lOW2ZsqTyksKumNzJXtg7rKIiI4QpaIfTkbi2upoJkSfeASugK Hw2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IPchkGJSMNf/bGVi4QMD2CaRXadW0du4YX2JGa57jqU=; b=Ltf4bFyfIGg7xTVEczUFBEJve+xIerYwph0l82+aGTIeEh73hSE5vfeJpXOpWkqiiV XMauL2T6hQWNsO4laZPItF+bRuhsdTreZsNkBQejenp1yUWdOZx+ByxaioroW39skWv6 5ngIP5CTqGcGa6NUuyaShkwW9m79ll3mzPCf+ZvRQjRJ6nptHKuo86mMuDNsXfBBTTu7 NAlSdjAWhIJ5CH6E04ErfKXIz1xZNyyruHimPznTbCBrMLs0EOhkE/pNya1TaQK5mi2q LxCpdSQXxrkIeX45g8Nvu5UiSVQJ6js44Lbc162+gxfw4FOpI+0o422aDCtCLOm1NUZ3 wI7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PbFdxsu1; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht22-20020a170907609600b00783ac0b4d32si3803779ejc.941.2022.10.25.10.24.07; Tue, 25 Oct 2022 10:24:32 -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=@chromium.org header.s=google header.b=PbFdxsu1; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231953AbiJYRPr (ORCPT + 99 others); Tue, 25 Oct 2022 13:15:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231327AbiJYRPo (ORCPT ); Tue, 25 Oct 2022 13:15:44 -0400 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FE2B1578AD for ; Tue, 25 Oct 2022 10:15:42 -0700 (PDT) Received: by mail-io1-xd32.google.com with SMTP id b79so10932368iof.5 for ; Tue, 25 Oct 2022 10:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IPchkGJSMNf/bGVi4QMD2CaRXadW0du4YX2JGa57jqU=; b=PbFdxsu1YMfbG4GaVPb9yW+FF+vy2Cv9dorwW+mP+0I7YbjQTw4HHT1kWzMXjtZ9mr ENvs/hG8wRpepj69cFz8W8dE5jRdQuumgmFXLQwdApKzBSeErqJLniEfe5t+0SFHSTBA bfnDTKc4VjGwv4a3SyhubAUzkKxB8+99bOrtY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IPchkGJSMNf/bGVi4QMD2CaRXadW0du4YX2JGa57jqU=; b=l0KEsrMJjgmWbnkycvExqp6CQsSTBDQoNRUk366QTbADej7hoebyScF4HwSDE43XCq UfFp/cfpcR0/FXq2Lt0n+/RD3ETzDL8EWd1wqWf5QP5kyDOra5VvEHtFlCKpifYimYPr wWnXn+IkNTFo3zZAFuqxhx0tM6BBRd8JlfEvD9Y6clFsjDh7dxrAvadXR9PXL2sZwiUI EFJK19tG/s2h3aYSd+CwNn4YgpT+ctoOYyyTQfaWMC7Z8zdj62N8Mx0rw/IOk+S8Op7N hbCRhcsr6Y+vKDU43TF728SIs282APZfwxO+YhhgoDVAVZbsnpnrqjrfxAwN2wBxjxDB BFxQ== X-Gm-Message-State: ACrzQf0i31YLTYVsGzHbPNSe/01CnSmOP+TiZt6pESvZ68ZyIPlIBK7r ctxTLzQnVaZvbpILieOvV+KIOw== X-Received: by 2002:a6b:c411:0:b0:6bc:1382:37d5 with SMTP id y17-20020a6bc411000000b006bc138237d5mr23770154ioa.133.1666718141538; Tue, 25 Oct 2022 10:15:41 -0700 (PDT) Received: from localhost (30.23.70.34.bc.googleusercontent.com. [34.70.23.30]) by smtp.gmail.com with UTF8SMTPSA id l11-20020a92d94b000000b002fc681a6ad8sm1165373ilq.78.2022.10.25.10.15.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Oct 2022 10:15:41 -0700 (PDT) From: Matthias Kaehlcke To: Amit Kucheria , Thara Gopinath , Andy Gross , Bjorn Andersson , Konrad Dybcio , "Rafael J . Wysocki" , Daniel Lezcano , Zhang Rui Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Kaehlcke , Luca Weiss Subject: [PATCH] thermal: qcom-spmi-temp-alarm: Log the actual max stage 2 threshold Date: Tue, 25 Oct 2022 17:15:08 +0000 Message-Id: <20221025171453.1.I13c2a23f276fb63bfc225aeab0bf0db9560a90e0@changeid> X-Mailer: git-send-email 2.38.0.135.g90850a2211-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 If the critical trip point of the thermal zone is higher than the max threshold of the PMIC log the actual max threshold of the chip, not the gen1 max threshold of 140°C. Reported-by: Luca Weiss Signed-off-by: Matthias Kaehlcke --- drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c index be785ab37e53..bdfe2129c357 100644 --- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c +++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c @@ -252,7 +252,8 @@ static int qpnp_tm_update_critical_trip_temp(struct qpnp_tm_chip *chip, disable_s2_shutdown = true; else dev_warn(chip->dev, - "No ADC is configured and critical temperature is above the maximum stage 2 threshold of 140 C! Configuring stage 2 shutdown at 140 C.\n"); + "No ADC is configured and critical temperature is above the maximum stage 2 threshold of %d C! Configuring stage 2 shutdown at %d C.\n", + stage2_threshold_max / 1000, stage2_threshold_max / 1000); } skip: -- 2.38.0.135.g90850a2211-goog