From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
rafael@kernel.org, srinivas.pandruvada@linux.intel.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, rui.zhang@intel.com,
Amit Kucheria <amitk@kernel.org>
Subject: Re: [PATCH v2 1/3] thermal/acpi: Add ACPI trip point routines
Date: Mon, 2 Jan 2023 19:11:53 +0100 [thread overview]
Message-ID: <ee53c6c9-4bd3-09ef-9b78-4eaf1f9ca682@wanadoo.fr> (raw)
In-Reply-To: <20230102180112.1954082-2-daniel.lezcano@kernel.org>
Le 02/01/2023 à 19:01, Daniel Lezcano a écrit :
> From: Daniel Lezcano <daniel.lezcano@linaro.org>
>
> The ACPI specification describes the trip points, the device tree
> bindings as well.
>
> The OF code uses the generic trip point structures.
>
> The ACPI has their own trip points structure and uses the get_trip_*
> ops to retrieve them.
>
> We can do the same as the OF code and create a set of ACPI functions
> to retrieve a trip point description. Having a common code for ACPI
> will help to cleanup the remaining Intel drivers and get rid of the
> get_trip_* functions.
>
> These changes add the ACPI thermal calls to retrieve the basic
> information we need to be reused in the thermal ACPI and Intel
> drivers.
>
> The different ACPI functions have the generic trip point structure
> passed as parameter where it is filled.
>
> This structure aims to be the one used by all the thermal drivers and
> the thermal framework.
>
> After this series, a couple of Intel drivers and the ACPI thermal
> driver will still have their own trip points definition but a new
> series on top of this one will finish the conversion to the generic
> trip point handling.
>
> This series depends on the generic trip point added to the thermal
> framework and available in the thermal/linux-next branch.
>
> https://lkml.org/lkml/2022/10/3/456
>
> 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>
[...]
> +int thermal_acpi_trip_psv_tc2(struct acpi_device *adev)
> +{
> + acpi_status status;
> + unsigned long long tc2;
> +
> + /*
> + * _TC2 (Thermal Constant 1): This object evaluates to the constant _TC2
Hi, should there be a V3 (or if/when the patch is applied):
Thermal Constant s/1/2/?
CJ
> + * for use in the Passive cooling formula
> + */
> + status = acpi_evaluate_integer(adev->handle, "_TC2", NULL, &tc2);
> + if (ACPI_FAILURE(status))
> + return -EINVAL;
> +
> + return (int)tc2;
> +}
> +EXPORT_SYMBOL_GPL(thermal_acpi_trip_psv_tc2);
[...]
next prev parent reply other threads:[~2023-01-02 18:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-02 18:01 [PATCH v2 0/3] Thermal ACPI APIs for generic trip points Daniel Lezcano
2023-01-02 18:01 ` [PATCH v2 1/3] thermal/acpi: Add ACPI trip point routines Daniel Lezcano
2023-01-02 18:11 ` Christophe JAILLET [this message]
2023-01-02 18:22 ` Rafael J. Wysocki
2023-01-03 10:44 ` Daniel Lezcano
2023-01-02 18:01 ` [PATCH v2 2/3] thermal/drivers/intel: Use generic trip points for intel_pch Daniel Lezcano
2023-01-02 18:01 ` [PATCH v2 3/3] thermal/drivers/intel: Use generic trip points int340x Daniel Lezcano
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=ee53c6c9-4bd3-09ef-9b78-4eaf1f9ca682@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.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®