diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2023-12-21 19:40:48 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2023-12-21 19:40:48 +0000 |
commit | 3b1e3eb73101c8b5bb485306177cd482d188ee2e (patch) | |
tree | e7d8c379e11563cf9ec3a2e338cbebbfb76c15a6 | |
parent | 459ea3d4f9159a76be3fb089b0f135568c41829b (diff) |
New TEMPerGold sensor; reported by Mikolaj Kucharski on bugs@
-rw-r--r-- | share/man/man4/ugold.4 | 5 | ||||
-rw-r--r-- | sys/dev/usb/ugold.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/share/man/man4/ugold.4 b/share/man/man4/ugold.4 index 43df0892d03..abf6b68751a 100644 --- a/share/man/man4/ugold.4 +++ b/share/man/man4/ugold.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ugold.4,v 1.9 2023/12/08 06:33:48 miod Exp $ +.\" $OpenBSD: ugold.4,v 1.10 2023/12/21 19:40:47 miod Exp $ .\" .\" Copyright (c) 2013 Takayoshi SASANO <sasano@openbsd.org> .\" Copyright (c) 2013 Martin Pieuchot <mpi@openbsd.org> @@ -16,7 +16,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 8 2023 $ +.Dd $Mdocdate: December 21 2023 $ .Dt UGOLD 4 .Os .Sh NAME @@ -39,6 +39,7 @@ driver: .It Li "RDing TEMPer2_V4.1" Ta "2 Temperature (internal/external)" .It Li "RDing TEMPerGold_V3.1" Ta "1 Temperature" .It Li "RDing TEMPerGold_V3.4" Ta "1 Temperature" +.It Li "RDing TEMPerGold_V3.5" Ta "1 Temperature" .It Li "RDing TEMPerHum1V1.0" Ta "1 Temperature and 1 Humidity" .It Li "RDing TEMPerHum1V1.2" Ta "1 Temperature and 1 Humidity" .It Li "RDing TEMPerHUM_V3.9" Ta "1 Temperature and 1 Humidity" diff --git a/sys/dev/usb/ugold.c b/sys/dev/usb/ugold.c index 7f7dfad213c..c761e5a9f1a 100644 --- a/sys/dev/usb/ugold.c +++ b/sys/dev/usb/ugold.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugold.c,v 1.26 2023/12/10 19:03:37 miod Exp $ */ +/* $OpenBSD: ugold.c,v 1.27 2023/12/21 19:40:47 miod Exp $ */ /* * Copyright (c) 2013 Takayoshi SASANO <uaa@openbsd.org> @@ -498,8 +498,14 @@ ugold_si700x_type(struct ugold_softc *sc) /* TEMPerGold prefix */ if (sc->sc_model_len >= 11 && memcmp(sc->sc_model, "TEMPerGold_", 11) == 0) { + /* + * All V3.something models ought to work, but better be + * safe than sorry, and TEMPerHum models have been known + * to use slightly different sensors between models. + */ if (memcmp(sc->sc_model + 11, "V3.1 ", 16 - 11) == 0 || - memcmp(sc->sc_model + 11, "V3.4 ", 16 - 11) == 0) { + memcmp(sc->sc_model + 11, "V3.4 ", 16 - 11) == 0 || + memcmp(sc->sc_model + 11, "V3.5 ", 16 - 11) == 0) { sc->sc_type = UGOLD_TYPE_GOLD; sc->sc_num_sensors = 1; descr = "gold (temperature only)"; |