From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: amitk@kernel.org, "open list:THERMAL" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
rui.zhang@intel.com
Subject: Re: [PATCH v1 09/11] thermal/core: Add a linked device parameter
Date: Tue, 4 Apr 2023 21:01:45 +0200 [thread overview]
Message-ID: <a7cf78b9-84f3-a10a-d192-8f45565d85c9@linaro.org> (raw)
In-Reply-To: <CAJZ5v0hW1B7XmU16PHRE2B6z2e-qs=X8m4v8qb--MUttiPuGqw@mail.gmail.com>
On 27/03/2023 18:16, Rafael J. Wysocki wrote:
> On Tue, Mar 7, 2023 at 2:38 PM Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>>
>> Some drivers want to create a link from the thermal zone to the device
>> sysfs entry and vice versa.
>
> Which device is this, exactly?
ls -alh /sys/bus/acpi/drivers/thermal/LNXTHERM:00/
[ ... ]
lrwxrwxrwx 1 0 thermal_zone ->
../../../virtual/thermal/thermal_zone0
[ ... ]
The ACPI driver is the only one doing this AFAICT.
>> That is the case of the APCI driver.
>>
>> Having a backpointer from the device to the thermal zone sounds akward
>> as we can have the same device instantiating multiple thermal zones so
>> there will be a conflict while creating the second link with the same
>> name. Moreover, the userspace has enough information to build the
>> dependency from the thermal zone device link without having this cyclic
>> link from the device to thermal zone.
>>
>> Anyway, everything in its time.
>>
>> This change allows to create a these cyclic links tz <-> device as
>> ACPI does and will allow to remove the code in the ACPI driver.
>
> Well, I'd rather have it in the driver than in the core TBH.
>
> If ACPI is the only user of this, let it do the dirty thing by itself.
>
> There are two cases which would justify making this change:
> 1. There will be more users of it going forward (seems unlikely from
> the description).
> 2. It gets in the way of some other changes somehow.
>
> I kind of expect 2. to be the case, so how does it get in the way?
Shall we do the same approach than 'Menlow' and add an option to remove
the thermal zone link in the acpi sysfs directory ?
--
<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-04-04 19:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230307133735.90772-1-daniel.lezcano@linaro.org>
2023-03-07 13:37 ` [PATCH v1 01/11] thermal/core: Relocate the traces definition in thermal directory Daniel Lezcano
2023-03-07 15:51 ` Steven Rostedt
2023-03-07 13:37 ` [PATCH v1 02/11] thermal/drivers/intel_pch_thermal: Use thermal driver device to write a trace Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 03/11] thermal/drivers/intel_menlow: Remove add_one_attribute Daniel Lezcano
2023-03-13 10:55 ` Daniel Lezcano
2023-03-13 12:26 ` Rafael J. Wysocki
2023-03-13 12:35 ` Daniel Lezcano
2023-03-17 18:18 ` Rafael J. Wysocki
2023-04-04 18:12 ` Daniel Lezcano
2023-04-04 18:14 ` Rafael J. Wysocki
2023-03-07 13:37 ` [PATCH v1 04/11] thermal/drivers/db8500: Use driver dev instead of tz->device Daniel Lezcano
2023-03-07 20:52 ` Linus Walleij
2023-03-07 13:37 ` [PATCH v1 05/11] thermal/drivers/stm: Don't set no_hwmon to false Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 06/11] thermal/drivers/ti: Use fixed update interval Daniel Lezcano
2023-03-07 13:47 ` J, KEERTHY
2023-03-07 15:30 ` Gole, Dhruva
2023-03-07 13:37 ` [PATCH v1 07/11] thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 08/11] thermal/of: Unexport unused OF functions Daniel Lezcano
2023-03-07 13:37 ` [PATCH v1 09/11] thermal/core: Add a linked device parameter Daniel Lezcano
2023-03-27 16:16 ` Rafael J. Wysocki
2023-04-04 19:01 ` Daniel Lezcano [this message]
2023-04-14 18:43 ` Rafael J. Wysocki
2023-03-07 13:37 ` [PATCH v1 10/11] thermal/core: Alloc-copy-free the thermal zone parameters structure Daniel Lezcano
2023-03-15 12:54 ` kernel test robot
2023-03-18 9:07 ` Dan Carpenter
2023-03-07 13:37 ` [PATCH v1 11/11] thermal/acpi: Use the thermal zone parameter to specify the device link 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=a7cf78b9-84f3-a10a-d192-8f45565d85c9@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=amitk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rui.zhang@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®