From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: srinivas.pandruvada@linux.intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, rui.zhang@intel.com,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Amit Kucheria <amitk@kernel.org>
Subject: Re: [PATCH 3/3] thermal/drivers/intel: Use generic trip points for intel_soc_dts_iosf
Date: Tue, 24 Jan 2023 11:28:45 +0100 [thread overview]
Message-ID: <a08e0d60-994a-c11b-2f5d-55c6984df7b4@linaro.org> (raw)
In-Reply-To: <CAJZ5v0gSG3aaeywiMWZTzWHmz_tVupeB1xyZfXhhXJ3NEV8-Yg@mail.gmail.com>
On 23/01/2023 21:19, Rafael J. Wysocki wrote:
> On Mon, Jan 23, 2023 at 7:09 PM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
>>
>>
>> Hi Srinivas,
>>
>> On 19/01/2023 21:04, Rafael J. Wysocki wrote:
>>> On Wed, Jan 18, 2023 at 7:16 PM Daniel Lezcano
>>> <daniel.lezcano@linaro.org> wrote:
>>>>
>>>> From: Daniel Lezcano <daniel.lezcano@kernel.org>
>>>>
>>>> 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 ops content logic into generic trip points and register them with the
>>>> thermal zone.
>>>>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>
>> [ ... ]
>>
>>>>
>>>> @@ -320,7 +304,8 @@ static int add_dts_thermal_zone(int id, struct intel_soc_dts_sensor_entry *dts,
>>>> dts->trip_mask = trip_mask;
>>>> dts->trip_count = trip_count;
>>>> snprintf(name, sizeof(name), "soc_dts%d", id);
>>>> - dts->tzone = thermal_zone_device_register(name,
>>>> + dts->tzone = thermal_zone_device_register_with_trips(name,
>>>> + dts->trips,
>>>> trip_count,
>>>> trip_mask,
>>>> dts, &tzone_ops,
>>>> @@ -430,27 +415,28 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init(
>>>> notification = false;
>>>> else
>>>> notification = true;
>>>> - for (i = 0; i < SOC_MAX_DTS_SENSORS; ++i) {
>>>> - sensors->soc_dts[i].sensors = sensors;
>>>> - ret = add_dts_thermal_zone(i, &sensors->soc_dts[i],
>>>> - notification, trip_count,
>>>> - read_only_trip_count);
>>>> - if (ret)
>>>> - goto err_free;
>>>> - }
>>>
>>> How is this change related to the rest of the patch?
>>
>> We want to register the thermal zone with the trip points.
>>
>> thermal_zone_device_register() becomes
>>
>> thermal_zone_device_register_with_trips()
>>
>> But in the current code, the trip points are updated after the thermal
>> zones are created (and strictly speaking it is wrong as get_trip_temp
>> can be invoked before the trip points are updated).
>>
>> So the change inverts the initialization where we update the trip points
>> and then we register the thermal zones.
>
> It would be nice to write this in the changelog too.
Srinivasn, are you fine with the changes ?
Rafael, if the patches are ok, shall I resend a new version with the
changelog updated or can you pick them amending the changelog ?
--
<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-24 10:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 18:16 [PATCH 1/3] thermal/drivers/intel: Use generic trip points for quark_dts Daniel Lezcano
2023-01-18 18:16 ` [PATCH 2/3] thermal/drivers/intel: Use generic trip points for processor_thermal_device_pci Daniel Lezcano
2023-01-18 19:09 ` srinivas pandruvada
2023-01-23 18:02 ` Daniel Lezcano
2023-01-23 19:31 ` srinivas pandruvada
2023-01-26 15:18 ` Rafael J. Wysocki
2023-01-18 18:16 ` [PATCH 3/3] thermal/drivers/intel: Use generic trip points for intel_soc_dts_iosf Daniel Lezcano
2023-01-19 20:04 ` Rafael J. Wysocki
2023-01-23 18:09 ` Daniel Lezcano
2023-01-23 20:19 ` Rafael J. Wysocki
2023-01-24 10:28 ` Daniel Lezcano [this message]
2023-01-24 14:09 ` Rafael J. Wysocki
2023-01-26 16:47 ` Rafael J. Wysocki
2023-01-31 17:03 ` Daniel Lezcano
2023-01-31 19:17 ` Rafael J. Wysocki
2023-02-02 14:36 ` Daniel Lezcano
2023-02-02 14:43 ` Rafael J. Wysocki
2023-02-02 15:54 ` Daniel Lezcano
2023-01-26 14:15 ` [PATCH 1/3] thermal/drivers/intel: Use generic trip points for quark_dts Rafael J. Wysocki
2023-01-31 16:41 ` Daniel Lezcano
2023-01-31 19:11 ` Rafael J. Wysocki
2023-01-31 23:55 ` Daniel Lezcano
2023-02-01 10:42 ` Daniel Lezcano
2023-02-01 18:47 ` Rafael J. Wysocki
2023-02-01 19:27 ` Daniel Lezcano
2023-02-02 10:32 ` Rafael J. Wysocki
2023-02-02 13:31 ` 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=a08e0d60-994a-c11b-2f5d-55c6984df7b4@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@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®