mirror of https://lore.kernel.org/lkml/
 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>,
	Andres Freund <andres@anarazel.de>,
	Chuhong Yuan <hslester96@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Gayatri Kammela <gayatri.kammela@intel.com>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	linux-pm@vger.kernel.org (open list:THERMAL),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 2/2] thermal: intel_pch_thermal: Add critical callback to override default shutdown behavior
Date: Mon, 21 Dec 2020 21:52:03 +0800	[thread overview]
Message-ID: <20201221135206.17671-2-kai.heng.feng@canonical.com> (raw)
In-Reply-To: <20201221135206.17671-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>
---
 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 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 13:52 [PATCH 1/2] thermal: int340x: " Kai-Heng Feng
2020-12-21 13:52 ` Kai-Heng Feng [this message]
2020-12-21 13:59 ` Daniel Lezcano
2020-12-21 15:00   ` Kai-Heng Feng
2020-12-21 16:03     ` Daniel Lezcano
2020-12-21 16:57       ` Srinivas Pandruvada
2020-12-21 16:55 ` Srinivas Pandruvada
2020-12-21 16:58   ` 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=20201221135206.17671-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®