[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5010f7df-59d6-92ef-c99a-0dbd715f0ad2@collabora.com>
Date: Fri, 29 May 2020 18:08:51 +0200
From: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: linux-pm@...r.kernel.org, linux-acpi@...r.kernel.org,
netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
platform-driver-x86@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-renesas-soc@...r.kernel.org,
linux-rockchip@...ts.infradead.org,
Emmanuel Grumbach <emmanuel.grumbach@...el.com>,
Heiko Stuebner <heiko@...ech.de>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Vishal Kulkarni <vishal@...lsio.com>,
Luca Coelho <luciano.coelho@...el.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
kernel@...labora.com, Fabio Estevam <festevam@...il.com>,
Amit Kucheria <amit.kucheria@...durent.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Allison Randal <allison@...utok.net>,
NXP Linux Team <linux-imx@....com>,
Darren Hart <dvhart@...radead.org>,
Zhang Rui <rui.zhang@...el.com>,
Gayatri Kammela <gayatri.kammela@...el.com>,
Len Brown <lenb@...nel.org>,
Johannes Berg <johannes.berg@...el.com>,
Intel Linux Wireless <linuxwifi@...el.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Ido Schimmel <idosch@...lanox.com>,
Baolin Wang <baolin.wang7@...il.com>,
Jiri Pirko <jiri@...lanox.com>,
Orson Zhai <orsonzhai@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Kalle Valo <kvalo@...eaurora.org>,
Support Opensource <support.opensource@...semi.com>,
Enrico Weigelt <info@...ux.net>,
Peter Kaestle <peter@...e.net>,
Sebastian Reichel <sre@...nel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Niklas Söderlund <niklas.soderlund@...natech.se>,
Shawn Guo <shawnguo@...nel.org>,
"David S . Miller" <davem@...emloft.net>,
Andy Shevchenko <andy@...radead.org>
Subject: Re: [PATCH v4 04/11] thermal: Store device mode in struct
thermal_zone_device
Hi Guenter,
W dniu 29.05.2020 o 17:42, Guenter Roeck pisze:
> On Thu, May 28, 2020 at 09:20:44PM +0200, Andrzej Pietrasiewicz wrote:
>> Prepare for eliminating get_mode().
>>
> Might be worthwhile to explain (not only in the subject) what you are
> doing here.
>
>> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
>> ---
>> drivers/acpi/thermal.c | 18 ++++++----------
>> .../ethernet/mellanox/mlxsw/core_thermal.c | 21 +++++++------------
>> drivers/platform/x86/acerhdf.c | 15 ++++++-------
>> drivers/thermal/da9062-thermal.c | 6 ++----
>> drivers/thermal/imx_thermal.c | 17 +++++++--------
>> .../intel/int340x_thermal/int3400_thermal.c | 12 +++--------
>> .../thermal/intel/intel_quark_dts_thermal.c | 16 +++++++-------
>> drivers/thermal/thermal_of.c | 10 +++------
>
> After this patch is applied on top of the thermal 'testing' branch,
> there are still local instances of thermal_device_mode in
> drivers/thermal/st/stm_thermal.c
> drivers/thermal/ti-soc-thermal/ti-thermal-common.c
>
> If there is a reason not to replace those, it might make sense to explain
> it here.
>
My understanding is that these two are sensor devices which are "plugged"
into their "parent" thermal zone device. The latter is the "proper" tzd.
They both use thermal_zone_of_device_ops instead of thermal_zone_device_ops.
The former doesn't even have get_mode(). The thermal core, when it calls
get_mode(), operates on the "parent" thermal zone devices.
Consequently, the drivers you mention use their "mode" members for
their private purpose, not for the purpose of storing the "parent"
thermal zone device mode.
Andrzej
Powered by blists - more mailing lists