[PATCH v3 2/3] thermal: spacemit: k1: Add thermal sensor support

Yao Zi me at ziyao.cc
Thu Mar 5 07:35:39 PST 2026


On Mon, Jan 19, 2026 at 10:41:22AM +0800, Shuwei Wu wrote:
> The thermal sensor on K1 supports monitoring five temperature zones.
> The driver registers these sensors with the thermal framework
> and supports standard operations:
> - Reading temperature (millidegree Celsius)
> - Setting high/low thresholds for interrupts
> 
> Signed-off-by: Shuwei Wu <shuweiwoo at 163.com>
> ---
> Changes in v3:
> - Align multi-line assignments as suggested by reviewer
> - Remove unnecessary variable definitions
> 
> Changes in v2:
> - Rename k1_thermal.c to k1_tsensor.c for better hardware alignment
> - Move driver to drivers/thermal/spacemit/
> - Add Kconfig/Makefile for spacemit and update top-level build files
> - Refactor names, style, code alignment, and comments
> - Simplify probe and error handling
> ---
>  drivers/thermal/Kconfig               |   2 +
>  drivers/thermal/Makefile              |   1 +
>  drivers/thermal/spacemit/Kconfig      |  19 +++
>  drivers/thermal/spacemit/Makefile     |   3 +
>  drivers/thermal/spacemit/k1_tsensor.c | 281 ++++++++++++++++++++++++++++++++++
>  5 files changed, 306 insertions(+)

Though I don't have the time to test it on my K1 board, the driver looks
good.

Reviewed-by: Yao Zi <me at ziyao.cc>

Thanks,
Yao Zi



More information about the linux-riscv mailing list