From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Zhang, Rui" <rui.zhang@intel.com>,
"rafael@kernel.org" <rafael@kernel.org>
Cc: "srinivas.pandruvada@linux.intel.com"
<srinivas.pandruvada@linux.intel.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"daniel.lezcano@kernel.org" <daniel.lezcano@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"christophe.jaillet@wanadoo.fr" <christophe.jaillet@wanadoo.fr>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"amitk@kernel.org" <amitk@kernel.org>
Subject: Re: [PATCH 3/3] thermal/drivers/intel: Use generic trip points int340x
Date: Fri, 13 Jan 2023 13:12:47 +0100 [thread overview]
Message-ID: <ddcfbd2e-2ea0-9305-96c4-8127181cdd8c@linaro.org> (raw)
In-Reply-To: <4f461027be209156d6d9f26870748f204ff4184b.camel@intel.com>
Hi Rui;
thanks for testing and your comments
On 13/01/2023 12:41, Zhang, Rui wrote:
> On Tue, 2023-01-10 at 16:17 +0100, Daniel Lezcano wrote:
>> The thermal framework gives the possibility to register the trip
>> points with the thermal zone. When that is done, no get_trip_* ops
>> are
>> needed and they can be removed.
>>
>> Convert the ops content logic into generic trip points and register
>> them with the thermal zone.
>>
>> In order to consolidate the code, use the ACPI thermal framework API
>> to fill the generic trip point from the ACPI tables.
>>
>> It has been tested on a Intel i7-8650U - x280 with the INT3400, the
>> PCH, ACPITZ, and x86_pkg_temp. No regression observed so far.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
>> ---
>> V3:
>> - The driver Kconfig option selects CONFIG_THERMAL_ACPI
>> - Change the initialization to use GTSH for the hysteresis on
>> all the trip points
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>> drivers/thermal/intel/int340x_thermal/Kconfig | 1 +
>> .../int340x_thermal/int340x_thermal_zone.c | 177 ++++----------
>> ----
[ ... ]
>> -static int int340x_thermal_get_trip_hyst(struct thermal_zone_device
>> *zone,
>> - int trip, int *temp)
>> -{
>> - struct int34x_thermal_zone *d = zone->devdata;
>> - acpi_status status;
>> - unsigned long long hyst;
>> -
>> - status = acpi_evaluate_integer(d->adev->handle, "GTSH", NULL,
>> &hyst);
>> - if (ACPI_FAILURE(status))
>> - *temp = 0;
>> - else
>> - *temp = hyst * 100;
>
> The previous code returns hyst * 100.
> But the new API retuurns hyst directly.
>
> -/sys/class/thermal/thermal_zone2/trip_point_4_hyst:2000
> +/sys/class/the
> rmal/thermal_zone2/trip_point_4_hyst:20
>
> Is this done on purpose?
No, it is an error. The function thermal_acpi_trip_gtsh() should do:
return deci_kelvin_to_millicelsius(hyst);
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
next prev parent reply other threads:[~2023-01-13 12:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 15:17 [PATCH v4 0/3] Thermal ACPI APIs for generic trip points Daniel Lezcano
2023-01-10 15:17 ` [PATCH 1/3] thermal/acpi: Add ACPI trip point routines Daniel Lezcano
2023-01-10 15:17 ` [PATCH 2/3] thermal/drivers/intel: Use generic trip points for intel_pch Daniel Lezcano
2023-01-10 15:17 ` [PATCH 3/3] thermal/drivers/intel: Use generic trip points int340x Daniel Lezcano
2023-01-13 11:41 ` Zhang, Rui
2023-01-13 12:12 ` Daniel Lezcano [this message]
2023-01-13 15:48 ` srinivas pandruvada
2023-01-13 17:21 ` Daniel Lezcano
2023-01-13 17:34 ` srinivas pandruvada
2023-01-13 15:44 ` srinivas pandruvada
2023-01-11 11:52 ` [PATCH v4 0/3] Thermal ACPI APIs for generic trip points Daniel Lezcano
2023-01-11 14:49 ` Zhang, Rui
2023-01-11 15:01 ` Daniel Lezcano
2023-01-12 2:13 ` Zhang, Rui
2023-01-13 11:46 ` Zhang, Rui
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=ddcfbd2e-2ea0-9305-96c4-8127181cdd8c@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=daniel.lezcano@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.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®