Message ID | 20230907112018.52811-1-linux@fw-web.de (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Daniel Lezcano |
Headers | show |
Series | thermal/drivers/mediatek: Fix control buffer enablement on MT7896 | expand |
Il 07/09/23 13:20, Frank Wunderlich ha scritto: > From: Frank Wunderlich <frank-w@public-files.de> > > Reading thermal sensor on mt7986 devices returns invalid temperature: > > bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp > -274000 > > Fix this by adding missing members in mtk_thermal_data struct which were > used in mtk_thermal_turn_on_buffer after commit 33140e668b10. > > Cc: stable@vger.kernel.org > Fixes: 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks") > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
On Thu, Sep 07, 2023 at 01:20:18PM +0200, Frank Wunderlich wrote: > From: Frank Wunderlich <frank-w@public-files.de> > > Reading thermal sensor on mt7986 devices returns invalid temperature: > > bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp > -274000 > > Fix this by adding missing members in mtk_thermal_data struct which were > used in mtk_thermal_turn_on_buffer after commit 33140e668b10. > > Cc: stable@vger.kernel.org > Fixes: 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks") > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com> Thanks for fixing! Best, Markus > --- > drivers/thermal/mediatek/auxadc_thermal.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c > index 843214d30bd8..967b9a1aead4 100644 > --- a/drivers/thermal/mediatek/auxadc_thermal.c > +++ b/drivers/thermal/mediatek/auxadc_thermal.c > @@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = { > .adcpnp = mt7986_adcpnp, > .sensor_mux_values = mt7986_mux_values, > .version = MTK_THERMAL_V3, > + .apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1, > + .apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3), > + .apmixed_buffer_ctl_set = BIT(0), > }; > > static bool mtk_thermal_temp_is_valid(int temp) > -- > 2.34.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi everyone! On Wed, Sep 13, 2023 at 10:35:29AM +0200, Markus Schneider-Pargmann wrote: > On Thu, Sep 07, 2023 at 01:20:18PM +0200, Frank Wunderlich wrote: > > From: Frank Wunderlich <frank-w@public-files.de> > > > > Reading thermal sensor on mt7986 devices returns invalid temperature: > > > > bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp > > -274000 > > > > Fix this by adding missing members in mtk_thermal_data struct which were > > used in mtk_thermal_turn_on_buffer after commit 33140e668b10. > > > > Cc: stable@vger.kernel.org > > Fixes: 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks") > > Signed-off-by: Frank Wunderlich <frank-w@public-files.de> > > Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com> Reviewed-by: Daniel Golle <daniel@makrotopia.org> Tested-by: Daniel Golle <daniel@makrotopia.org> Kind ping to thermal and mediatek maintainers, please merge this patch. https://patchwork.kernel.org/project/linux-pm/patch/20230907112018.52811-1-linux@fw-web.de/ https://patchwork.kernel.org/project/linux-mediatek/patch/20230907112018.52811-1-linux@fw-web.de/ > > Thanks for fixing! > > Best, > Markus > > > --- > > drivers/thermal/mediatek/auxadc_thermal.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c > > index 843214d30bd8..967b9a1aead4 100644 > > --- a/drivers/thermal/mediatek/auxadc_thermal.c > > +++ b/drivers/thermal/mediatek/auxadc_thermal.c > > @@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = { > > .adcpnp = mt7986_adcpnp, > > .sensor_mux_values = mt7986_mux_values, > > .version = MTK_THERMAL_V3, > > + .apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1, > > + .apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3), > > + .apmixed_buffer_ctl_set = BIT(0), > > }; > > > > static bool mtk_thermal_temp_is_valid(int temp) > > -- > > 2.34.1 > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >
On 31/01/2024 06:17, Daniel Golle wrote: > Hi everyone! > > On Wed, Sep 13, 2023 at 10:35:29AM +0200, Markus Schneider-Pargmann wrote: >> On Thu, Sep 07, 2023 at 01:20:18PM +0200, Frank Wunderlich wrote: >>> From: Frank Wunderlich <frank-w@public-files.de> >>> >>> Reading thermal sensor on mt7986 devices returns invalid temperature: >>> >>> bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp >>> -274000 >>> >>> Fix this by adding missing members in mtk_thermal_data struct which were >>> used in mtk_thermal_turn_on_buffer after commit 33140e668b10. >>> >>> Cc: stable@vger.kernel.org >>> Fixes: 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks") >>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de> >> >> Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com> > > Reviewed-by: Daniel Golle <daniel@makrotopia.org> > Tested-by: Daniel Golle <daniel@makrotopia.org> > > Kind ping to thermal and mediatek maintainers, please merge this patch. Applied with master pong Thanks!
diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c index 843214d30bd8..967b9a1aead4 100644 --- a/drivers/thermal/mediatek/auxadc_thermal.c +++ b/drivers/thermal/mediatek/auxadc_thermal.c @@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = { .adcpnp = mt7986_adcpnp, .sensor_mux_values = mt7986_mux_values, .version = MTK_THERMAL_V3, + .apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1, + .apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3), + .apmixed_buffer_ctl_set = BIT(0), }; static bool mtk_thermal_temp_is_valid(int temp)