1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- From patchwork Thu Sep 7 11:20:18 2023
- Content-Type: text/plain; charset="utf-8"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- X-Patchwork-Submitter: Frank Wunderlich <[email protected]>
- X-Patchwork-Id: 13376356
- From: Frank Wunderlich <[email protected]>
- To: [email protected]
- Subject: [PATCH] thermal/drivers/mediatek: Fix control buffer enablement on
- MT7896
- Date: Thu, 7 Sep 2023 13:20:18 +0200
- Message-Id: <[email protected]>
- X-Mailer: git-send-email 2.34.1
- MIME-Version: 1.0
- X-Mail-ID: e7eeb8e1-00de-41f6-a5df-ce2e9164136e
- X-BeenThere: [email protected]
- X-Mailman-Version: 2.1.34
- Precedence: list
- List-Id: <linux-mediatek.lists.infradead.org>
- Cc: Daniel Lezcano <[email protected]>,
- "Rafael J. Wysocki" <[email protected]>, [email protected],
- Amit Kucheria <[email protected]>, Daniel Golle <[email protected]>,
- [email protected], [email protected],
- Matthias Brugger <[email protected]>, Zhang Rui <[email protected]>,
- [email protected],
- AngeloGioacchino Del Regno <[email protected]>
- Sender: "Linux-mediatek" <[email protected]>
- From: Frank Wunderlich <[email protected]>
- 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: [email protected]
- Fixes: 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")
- Signed-off-by: Frank Wunderlich <[email protected]>
- Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
- Reviewed-by: Markus Schneider-Pargmann <[email protected]>
- ---
- drivers/thermal/mediatek/auxadc_thermal.c | 3 +++
- 1 file changed, 3 insertions(+)
- --- a/drivers/thermal/mediatek/auxadc_thermal.c
- +++ b/drivers/thermal/mediatek/auxadc_thermal.c
- @@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7
- .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)
|