From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: rafael@kernel.org
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
"Zhang Rui" <rui.zhang@intel.com>, "Len Brown" <lenb@kernel.org>,
"Damien Le Moal" <damien.lemoal@opensource.wdc.com>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"NXP Linux Team" <linux-imx@nxp.com>,
"Jean Delvare" <jdelvare@suse.com>,
"Guenter Roeck" <linux@roeck-us.net>,
"Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Chen-Yu Tsai" <wens@csie.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Samuel Holland" <samuel@sholland.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Ido Schimmel" <idosch@nvidia.com>,
"Petr Machata" <petrm@nvidia.com>,
"Gregory Greenman" <gregory.greenman@intel.com>,
"Kalle Valo" <kvalo@kernel.org>,
"Sebastian Reichel" <sre@kernel.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Miquel Raynal" <miquel.raynal@bootlin.com>,
"Amit Kucheria" <amitk@kernel.org>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Markus Mayer" <mmayer@broadcom.com>,
"Support Opensource" <support.opensource@diasemi.com>,
"Andy Gross" <agross@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konrad.dybcio@linaro.org>,
"Thara Gopinath" <thara.gopinath@gmail.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Heiko Stuebner" <heiko@sntech.de>,
"Bartlomiej Zolnierkiewicz" <bzolnier@gmail.com>,
"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Orson Zhai" <orsonzhai@gmail.com>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Chunyan Zhang" <zhang.lyra@gmail.com>,
"Vasily Khoruzhick" <anarsoul@gmail.com>,
"Yangtao Li" <tiny.windzz@gmail.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Talel Shenhar" <talel@amazon.com>,
"Eduardo Valentin" <edubezval@gmail.com>,
Keerthy <j-keerthy@ti.com>,
"Kunihiko Hayashi" <hayashi.kunihiko@socionext.com>,
"Masami Hiramatsu" <mhiramat@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Stefan Wahren" <stefan.wahren@i2se.com>,
"Zheng Yongjun" <zhengyongjun3@huawei.com>,
"Yang Li" <yang.lee@linux.alibaba.com>,
"Srinivas Pandruvada" <srinivas.pandruvada@linux.intel.com>,
"Daniel Golle" <daniel@makrotopia.org>,
"Balsam CHIHI" <bchihi@baylibre.com>,
"Mikko Perttunen" <mperttunen@nvidia.com>,
linux-acpi@vger.kernel.org, linux-ide@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-hwmon@vger.kernel.org, linux-iio@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-input@vger.kernel.org,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
linux-rpi-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-omap@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v3 00/17] Self-encapsulate the thermal zone device structure
Date: Thu, 23 Feb 2023 23:56:44 +0100 [thread overview]
Message-ID: <37b3b835-e992-0090-56e5-bd4d58e547a7@linaro.org> (raw)
In-Reply-To: <20230223224844.3491251-1-daniel.lezcano@linaro.org>
On 23/02/2023 23:48, Daniel Lezcano wrote:
> The exported thermal headers expose the thermal core structure while those
> should be private to the framework. The initial idea was the thermal sensor
> drivers use the thermal zone device structure pointer to pass it around from
> the ops to the thermal framework API like a handler.
>
> Unfortunately, different drivers are using and abusing the internals of this
> structure to hook the associated struct device, read the internals values, take
> the lock, etc ...
>
> rn order to fix this situation, let's encapsulate the structure leaking the
> more in the different drivers: the thermal_zone_device structure.
>
> This series revisit the existing drivers using the thermal zone private
> structure internals to change the access to something else. For instance, the
> get_temp() ops is using the tz->dev to write a debug trace. Despite the trace
> is not helpful, we can check the return value for the get_temp() ops in the
> call site and show the message in this place.
>
> With this set of changes, the thermal_zone_device is almost self-encapsulated.
> As usual, the acpi driver needs a more complex changes, so that will come in a
> separate series along with the structure moved the private core headers.
>
> Changelog:
> - V3:
> - Collected more tags
> - Added missing changes for ->devdata in some drivers
> - Added a 'type' accessor
> - Replaced the 'type' to 'id' changes by the 'type' accessor
> - Used the 'type' accessor in the drivers
> - V2:
> - Collected tags
> - Added missing changes for ->devdata for the tsens driver
> - Renamed thermal_zone_device_get_data() to thermal_zone_priv()
> - Added stubs when CONFIG_THERMAL is not set
> - Dropped hwmon change where we remove the tz->lock usage
>
> Thank you all for your comments
The series has been blocked by gsmtp because the next patch has too many
Cc. I'll sort out this and resend.
--
<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-02-23 22:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 22:48 [PATCH v3 00/17] Self-encapsulate the thermal zone device structure Daniel Lezcano
2023-02-23 22:56 ` Daniel Lezcano [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-02-24 21:06 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=37b3b835-e992-0090-56e5-bd4d58e547a7@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=amitk@kernel.org \
--cc=anarsoul@gmail.com \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bchihi@baylibre.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=broonie@kernel.org \
--cc=bzolnier@gmail.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=edubezval@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=festevam@gmail.com \
--cc=gregory.greenman@intel.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=heiko@sntech.de \
--cc=idosch@nvidia.com \
--cc=j-keerthy@ti.com \
--cc=jdelvare@suse.com \
--cc=jernej.skrabec@gmail.com \
--cc=jic23@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=lars@metafoo.de \
--cc=lenb@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=matthias.bgg@gmail.com \
--cc=mhiramat@kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=mmayer@broadcom.com \
--cc=mperttunen@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
--cc=orsonzhai@gmail.com \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=rafael@kernel.org \
--cc=rjui@broadcom.com \
--cc=rui.zhang@intel.com \
--cc=s.hauer@pengutronix.de \
--cc=samuel@sholland.org \
--cc=sbranden@broadcom.com \
--cc=shawnguo@kernel.org \
--cc=sre@kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=stefan.wahren@i2se.com \
--cc=support.opensource@diasemi.com \
--cc=talel@amazon.com \
--cc=thara.gopinath@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=tiny.windzz@gmail.com \
--cc=wens@csie.org \
--cc=yang.lee@linux.alibaba.com \
--cc=zhang.lyra@gmail.com \
--cc=zhengyongjun3@huawei.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