diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2023-07-01 08:20:39 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2023-07-01 08:20:39 +0000 |
commit | af4bcebfa774577014a00f90773e11175d2067e2 (patch) | |
tree | 210b3e487206d475afb4752a28c70a3acf9391ee /sys/arch/riscv64/dev/stftemp.c | |
parent | 7dd6a9d419211372f3cd47bc6b8e1e85de8e689a (diff) |
Add support for JH7110 to stftemp(4).
This adds temperature sensor support for the Starfive VisionFive 2.
ok kettenis@
Diffstat (limited to 'sys/arch/riscv64/dev/stftemp.c')
-rw-r--r-- | sys/arch/riscv64/dev/stftemp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/riscv64/dev/stftemp.c b/sys/arch/riscv64/dev/stftemp.c index 235f0f09fc4..7c4b836524e 100644 --- a/sys/arch/riscv64/dev/stftemp.c +++ b/sys/arch/riscv64/dev/stftemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stftemp.c,v 1.1 2022/06/12 10:51:55 kettenis Exp $ */ +/* $OpenBSD: stftemp.c,v 1.2 2023/07/01 08:20:38 jsing Exp $ */ /* * Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org> * @@ -72,7 +72,8 @@ stftemp_match(struct device *parent, void *match, void *aux) { struct fdt_attach_args *faa = aux; - return OF_is_compatible(faa->fa_node, "starfive,jh7100-temp"); + return OF_is_compatible(faa->fa_node, "starfive,jh7100-temp") || + OF_is_compatible(faa->fa_node, "starfive,jh7110-temp"); } void @@ -146,7 +147,7 @@ void stftemp_refresh_sensors(void *arg) { struct stftemp_softc *sc = arg; - + sc->sc_sensor.value = 273150000 + 1000 * stftemp_get_temp(sc); sc->sc_sensor.flags &= ~SENSOR_FINVALID; } |