All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org
Cc: andrzej.p@collabora.com, mjg59@google.com,
	srinivas.pandruvada@linux.intel.com,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	Gayatri Kammela <gayatri.kammela@intel.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Andres Freund <andres@anarazel.de>,
	Chuhong Yuan <hslester96@gmail.com>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	linux-pm@vger.kernel.org (open list:THERMAL),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 2/2] thermal: intel: pch: Fix unexpected shutdown at critical temperature
Date: Tue, 22 Dec 2020 01:23:44 +0800	[thread overview]
Message-ID: <20201221172345.36976-2-kai.heng.feng@canonical.com> (raw)
In-Reply-To: <20201221172345.36976-1-kai.heng.feng@canonical.com>

Like previous patch, the intel_pch_thermal device is not in ACPI
ThermalZone namespace, so a critical trip doesn't mean shutdown.

Override the default .critical callback to prevent surprising thermal
shutdoown.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v2:
 - Amend subject.

 drivers/thermal/intel/intel_pch_thermal.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index 41723c6c6c0c..527c91f5960b 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -326,10 +326,16 @@ static int pch_get_trip_temp(struct thermal_zone_device *tzd, int trip, int *tem
 	return 0;
 }
 
+static void pch_critical(struct thermal_zone_device *tzd)
+{
+	dev_dbg(&tzd->device, "%s: critical temperature reached\n", tzd->type);
+}
+
 static struct thermal_zone_device_ops tzd_ops = {
 	.get_temp = pch_thermal_get_temp,
 	.get_trip_type = pch_get_trip_type,
 	.get_trip_temp = pch_get_trip_temp,
+	.critical = pch_critical,
 };
 
 enum board_ids {
-- 
2.29.2


  reply	other threads:[~2020-12-21 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 17:23 [PATCH v2 1/2] thermal: int340x: Fix unexpected shutdown at critical temperature Kai-Heng Feng
2020-12-21 17:23 ` Kai-Heng Feng [this message]
2021-02-04  7:40   ` [thermal: thermal/next] thermal: intel: pch: " thermal-bot for Kai-Heng Feng
2021-01-11 16:18 ` [PATCH v2 1/2] thermal: int340x: " Kai-Heng Feng
2021-01-11 16:43   ` Daniel Lezcano
2021-02-04  7:40 ` [thermal: thermal/next] " thermal-bot for Kai-Heng Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201221172345.36976-2-kai.heng.feng@canonical.com \
    --to=kai.heng.feng@canonical.com \
    --cc=akinobu.mita@gmail.com \
    --cc=amitk@kernel.org \
    --cc=andres@anarazel.de \
    --cc=andriy.shevchenko@intel.com \
    --cc=andrzej.p@collabora.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=gayatri.kammela@intel.com \
    --cc=hslester96@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mjg59@google.com \
    --cc=rdunlap@infradead.org \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=sumeet.r.pawnikar@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.