[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201130053640.54608-3-kai.heng.feng@canonical.com>
Date: Mon, 30 Nov 2020 13:36:40 +0800
From: Kai-Heng Feng <kai.heng.feng@...onical.com>
To: rui.zhang@...el.com, daniel.lezcano@...aro.org, amitk@...nel.org
Cc: andrzej.p@...labora.com, mjg59@...gle.com,
srinivas.pandruvada@...ux.intel.com,
Kai-Heng Feng <kai.heng.feng@...onical.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Sumeet Pawnikar <sumeet.r.pawnikar@...el.com>,
Akinobu Mita <akinobu.mita@...il.com>,
Chuhong Yuan <hslester96@...il.com>,
Gayatri Kammela <gayatri.kammela@...el.com>,
linux-pm@...r.kernel.org (open list:THERMAL),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 3/3] thermal: intel: intel_pch_thermal: Indicate userspace usage
The device isn't present under ACPI ThermalZone, and there's a dedicated
userspace daemon for this thermal device.
Let thermal core know it shouldn't handle trips to avoid surprising
thermal shutdown.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
---
drivers/thermal/intel/intel_pch_thermal.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c
index 3b813ebb6ca1..e55e6318d733 100644
--- a/drivers/thermal/intel/intel_pch_thermal.c
+++ b/drivers/thermal/intel/intel_pch_thermal.c
@@ -270,6 +270,10 @@ static struct thermal_zone_device_ops tzd_ops = {
.get_trip_temp = pch_get_trip_temp,
};
+static struct thermal_zone_params tzd_params = {
+ .userspace = true,
+};
+
enum board_ids {
board_hsw,
board_wpt,
@@ -346,21 +350,16 @@ static int intel_pch_thermal_probe(struct pci_dev *pdev,
goto error_cleanup;
ptd->tzd = thermal_zone_device_register(bi->name, nr_trips, 0, ptd,
- &tzd_ops, NULL, 0, 0);
+ &tzd_ops, &tzd_params, 0, 0);
if (IS_ERR(ptd->tzd)) {
dev_err(&pdev->dev, "Failed to register thermal zone %s\n",
bi->name);
err = PTR_ERR(ptd->tzd);
goto error_cleanup;
}
- err = thermal_zone_device_enable(ptd->tzd);
- if (err)
- goto err_unregister;
return 0;
-err_unregister:
- thermal_zone_device_unregister(ptd->tzd);
error_cleanup:
iounmap(ptd->hw_base);
error_release:
--
2.29.2
Powered by blists - more mailing lists