From: Daniel Lezcano <daniel.lezcano@linexp.org>
To: daniel.lezcano@linaro.org, rafael@kernel.org
Cc: rui.zhang@intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, khilman@baylibre.com,
abailon@baylibre.com, lukasz.luba@arm.com, broonie@kernel.org,
damien.lemoal@opensource.wdc.com, heiko@sntech.de,
hayashi.kunihiko@socionext.com, mhiramat@kernel.org,
talel@amazon.com, thierry.reding@gmail.com, digetx@gmail.com,
jonathanh@nvidia.com, anarsoul@gmail.com, tiny.windzz@gmail.com,
baolin.wang7@gmail.com, f.fainelli@gmail.com,
bjorn.andersson@linaro.org, mcoquelin.stm32@gmail.com,
glaroque@baylibre.com, miquel.raynal@bootlin.com,
shawnguo@kernel.org, niklas.soderlund@ragnatech.se,
matthias.bgg@gmail.com, j-keerthy@ti.com,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
linux-input@vger.kernel.org (open list:INPUT (KEYBOARD, MOUSE,
JOYSTICK , TOUCHSCREEN)...),
linux-arm-kernel@lists.infradead.org (moderated
list:ARM/Allwinner sunXi SoC support),
linux-sunxi@lists.linux.dev (open list:ARM/Allwinner sunXi SoC
support)
Subject: [PATCH v4 28/32] Input: sun4i-ts - switch to new of thermal API
Date: Mon, 1 Aug 2022 23:22:40 +0200 [thread overview]
Message-ID: <20220801212244.1124867-29-daniel.lezcano@linexp.org> (raw)
In-Reply-To: <20220801212244.1124867-1-daniel.lezcano@linexp.org>
The thermal OF code has a new API allowing to migrate the OF
initialization to a simpler approach. The ops are no longer device
tree specific and are the generic ones provided by the core code.
Convert the ops to the thermal_zone_device_ops format and use the new
API to register the thermal zone with these generic ops.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linexp.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/touchscreen/sun4i-ts.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
index 742a7e96c1b5..73eb8f80be6e 100644
--- a/drivers/input/touchscreen/sun4i-ts.c
+++ b/drivers/input/touchscreen/sun4i-ts.c
@@ -192,12 +192,12 @@ static int sun4i_get_temp(const struct sun4i_ts_data *ts, int *temp)
return 0;
}
-static int sun4i_get_tz_temp(void *data, int *temp)
+static int sun4i_get_tz_temp(struct thermal_zone_device *tz, int *temp)
{
- return sun4i_get_temp(data, temp);
+ return sun4i_get_temp(tz->devdata, temp);
}
-static const struct thermal_zone_of_device_ops sun4i_ts_tz_ops = {
+static const struct thermal_zone_device_ops sun4i_ts_tz_ops = {
.get_temp = sun4i_get_tz_temp,
};
@@ -356,8 +356,8 @@ static int sun4i_ts_probe(struct platform_device *pdev)
if (IS_ERR(hwmon))
return PTR_ERR(hwmon);
- thermal = devm_thermal_zone_of_sensor_register(ts->dev, 0, ts,
- &sun4i_ts_tz_ops);
+ thermal = devm_thermal_of_zone_register(ts->dev, 0, ts,
+ &sun4i_ts_tz_ops);
if (IS_ERR(thermal))
return PTR_ERR(thermal);
--
2.25.1
parent reply other threads:[~2022-08-01 21:26 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20220801212244.1124867-1-daniel.lezcano@linexp.org>]
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=20220801212244.1124867-29-daniel.lezcano@linexp.org \
--to=daniel.lezcano@linexp.org \
--cc=abailon@baylibre.com \
--cc=anarsoul@gmail.com \
--cc=baolin.wang7@gmail.com \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=damien.lemoal@opensource.wdc.com \
--cc=daniel.lezcano@linaro.org \
--cc=digetx@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=glaroque@baylibre.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=heiko@sntech.de \
--cc=j-keerthy@ti.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=lukasz.luba@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mhiramat@kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=niklas.soderlund@ragnatech.se \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
--cc=samuel@sholland.org \
--cc=shawnguo@kernel.org \
--cc=talel@amazon.com \
--cc=thierry.reding@gmail.com \
--cc=tiny.windzz@gmail.com \
--cc=wens@csie.org \
/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;
as well as URLs for NNTP newsgroup(s).