linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] thermal: mediatek: add support for MT7986 and MT7981
@ 2023-01-18  3:55 Daniel Golle
  2023-01-18  3:55 ` [PATCH v4 1/2] thermal: mediatek: use function pointer for raw_to_mcelsius Daniel Golle
  2023-01-18  3:55 ` [PATCH v4 2/2] thermal: mediatek: add support for MT7986 and MT7981 Daniel Golle
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Golle @ 2023-01-18  3:55 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, linux-pm, linux-arm-kernel,
	linux-mediatek, linux-kernel, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Matthias Brugger, Rob Herring
  Cc: John Crispin, Steven Liu, Chad Monroe, Henry Yen

As requested in a previous review, first convert the if-else selection
of the raw_to_mcelsius_* function to instead use a function pointer
added to struct mtk_thermal. Then add thermal support for the MT7986
SoC which can also be used on MT7981.

Device Tree bindings have already been merged[1].

When submitting v3, it looked like the patch series submitted by Amjad
Ouled-Ameur ("thermal: mediatek: Add support for MT8365 SoC"[2]) which
also adds this function pointer would be merged first. However, this a
re-spin of this series addressing the comments it has received has not
yet been submitted. The change introducing the raw_to_mcelsius function
pointer is hence being applied independently.

Changes since v2: Rebase on top of pending patch introducing
raw_to_mcelsius function pointer.
Drop left-over macro extracting the unused adc_oe field.
Use switch (...) instead of if-else-if-else-... statements.
For now, return -EINVAL as default in case of unknown version. Imho
this should be BUG(), as this version is only defined within this
driver.

Changes since v1: Drop use of adc_oe field in efuse, Henry Yen
confirmed its use has been dropped intentionally in MTK SDK as well.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//071e99848ccc1fbe238c4c9c7cfffd83f1dfe156
[2]: https://lore.kernel.org/linux-arm-kernel/4121bb6b-30db-7a23-f4c8-40afdda7a0b5@linaro.org/T/

Daniel Golle (2):
  thermal/drivers/mtk: use function pointer for raw_to_mcelsius
  thermal: mediatek: add support for MT7986 and MT7981

 drivers/thermal/mtk_thermal.c | 150 +++++++++++++++++++++++++++++++---
 1 file changed, 140 insertions(+), 10 deletions(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-18 12:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18  3:55 [PATCH v4 0/2] thermal: mediatek: add support for MT7986 and MT7981 Daniel Golle
2023-01-18  3:55 ` [PATCH v4 1/2] thermal: mediatek: use function pointer for raw_to_mcelsius Daniel Golle
2023-01-18 12:51   ` AngeloGioacchino Del Regno
2023-01-18  3:55 ` [PATCH v4 2/2] thermal: mediatek: add support for MT7986 and MT7981 Daniel Golle
2023-01-18 12:53   ` AngeloGioacchino Del Regno

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).