diff options
author | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-01-17 20:30:28 +0000 |
---|---|---|
committer | Alexander Yurchenko <grange@cvs.openbsd.org> | 2009-01-17 20:30:28 +0000 |
commit | d185b1a4f081405ed3f21065bbdaf7b3f355362c (patch) | |
tree | c6b1b16030eab39bb6101f5355c4322e478471ab /sys | |
parent | 734e401a06c3fd1808628861bab9653af16377e5 (diff) |
Add support for DS1822 to owtemp(4).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/onewire/owtemp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/onewire/owtemp.c b/sys/dev/onewire/owtemp.c index 0016c9393db..5901afb68ed 100644 --- a/sys/dev/onewire/owtemp.c +++ b/sys/dev/onewire/owtemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: owtemp.c,v 1.11 2008/12/26 18:17:25 todd Exp $ */ +/* $OpenBSD: owtemp.c,v 1.12 2009/01/17 20:30:27 grange Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org> @@ -79,7 +79,8 @@ struct cfdriver owtemp_cd = { static const struct onewire_matchfam owtemp_fams[] = { { ONEWIRE_FAMILY_DS1920 }, - { ONEWIRE_FAMILY_DS18B20 } + { ONEWIRE_FAMILY_DS18B20 }, + { ONEWIRE_FAMILY_DS1822 } }; int @@ -174,7 +175,8 @@ owtemp_update(void *arg) if (onewire_crc(data, 8) == data[DS1920_SP_CRC]) { temp = data[DS1920_SP_TEMP_MSB] << 8 | data[DS1920_SP_TEMP_LSB]; - if (ONEWIRE_ROM_FAMILY(sc->sc_rom) == ONEWIRE_FAMILY_DS18B20) { + if (ONEWIRE_ROM_FAMILY(sc->sc_rom) == ONEWIRE_FAMILY_DS18B20 || + ONEWIRE_ROM_FAMILY(sc->sc_rom) == ONEWIRE_FAMILY_DS1822) { /* * DS18B20 decoding * default 12 bit 0.0625 C resolution |