From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: bchihi@baylibre.com
Cc: daniel.lezcano@linaro.org,
angelogioacchino.delregno@collabora.com, rafael@kernel.org,
amitk@kernel.org, rui.zhang@intel.com, matthias.bgg@gmail.com,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
rdunlap@infradead.org, ye.xingchen@zte.com.cn,
p.zabel@pengutronix.de, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
wenst@chromium.org, james.lo@mediatek.com,
rex-bc.chen@mediatek.com, abailon@baylibre.com,
amergnat@baylibre.com, khilman@baylibre.com
Subject: Re: [PATCH v2 3/5] thermal/drivers/mediatek/lvts_thermal: Add mt8192 support
Date: Fri, 28 Apr 2023 16:10:38 -0400 [thread overview]
Message-ID: <37680c5e-e61c-410b-b48d-829914200e4a@notapiano> (raw)
In-Reply-To: <20230425133052.199767-4-bchihi@baylibre.com>
On Tue, Apr 25, 2023 at 03:30:50PM +0200, bchihi@baylibre.com wrote:
> From: Balsam CHIHI <bchihi@baylibre.com>
>
> Add LVTS Driver support for MT8192.
>
> Signed-off-by: Balsam CHIHI <bchihi@baylibre.com>
> Co-developed-by : Nícolas F. R. A. Prado <nfraprado@collabora.com>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---
> drivers/thermal/mediatek/lvts_thermal.c | 92 +++++++++++++++++++++++++
> 1 file changed, 92 insertions(+)
>
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index 5ea8a9d569ea6..8df7b4c72a658 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
[..]
> +static const struct lvts_ctrl_data mt8192_lvts_mcu_data_ctrl[] = {
> + {
> + .cal_offset = { 0x04, 0x08 },
> + .lvts_sensor = {
> + { .dt_id = MT8192_MCU_BIG_CPU0 },
> + { .dt_id = MT8192_MCU_BIG_CPU1 }
> + },
> + .num_lvts_sensor = 2,
> + .offset = 0x0,
> + .hw_tshut_temp = LVTS_HW_SHUTDOWN_MT8192,
Hi Balsam,
during the investigation I did to fix the interrupt issues I mentioned in v1, I
noticed that the threshold interrupts (hot, hot to normal, cold), only trigger
when the controller is configured to filtered mode. In immediate mode the
threshold interrupts are not triggered.
So I say we add
.mode = LVTS_MSR_FILTERED_MODE,
for all the controllers here. Same for MT8195, although I guess that'd be better
done in a separate series. And I haven't had time to test more on MT8195 to see
if I can get any interrupts there.
One issue with filtered mode is that the data read is often not ready (valid bit
unset), so most of the time it returns -EAGAIN. But I think that should be easy
to address by reading with a timeout (equal to the measurement interval we
already know), instead of a single time, if on filtered mode.
I'll also try to review the other commits in this series, though that'll have to
wait for next week.
Thanks,
Nícolas
next prev parent reply other threads:[~2023-04-28 20:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 13:30 [PATCH v2 0/5] Add LVTS support for mt8192 bchihi
2023-04-25 13:30 ` [PATCH v2 1/5] thermal/drivers/mediatek/lvts_thermal: Add suspend and resume bchihi
2023-04-25 13:30 ` [PATCH v2 2/5] dt-bindings: thermal: mediatek: Add LVTS thermal controller definition for mt8192 bchihi
2023-05-04 0:49 ` Nícolas F. R. A. Prado
2023-04-25 13:30 ` [PATCH v2 3/5] thermal/drivers/mediatek/lvts_thermal: Add mt8192 support bchihi
2023-04-28 20:10 ` Nícolas F. R. A. Prado [this message]
2023-05-04 0:51 ` Nícolas F. R. A. Prado
2023-04-25 13:30 ` [PATCH v2 4/5] arm64: dts: mediatek: mt8192: Add thermal nodes and thermal zones bchihi
2023-05-04 0:53 ` Nícolas F. R. A. Prado
2023-04-25 13:30 ` [PATCH v2 5/5] thermal/drivers/mediatek/lvts_thermal: Update calibration data documentation bchihi
2023-05-04 1:01 ` Nícolas F. R. A. Prado
2023-05-02 10:35 ` [PATCH v2 0/5] Add LVTS support for mt8192 Chen-Yu Tsai
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=37680c5e-e61c-410b-b48d-829914200e4a@notapiano \
--to=nfraprado@collabora.com \
--cc=abailon@baylibre.com \
--cc=amergnat@baylibre.com \
--cc=amitk@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bchihi@baylibre.com \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=james.lo@mediatek.com \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rex-bc.chen@mediatek.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=wenst@chromium.org \
--cc=ye.xingchen@zte.com.cn \
/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