summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorcnst <cnst@openbsd.org>2008-03-19 21:01:10 +0000
committercnst <cnst@openbsd.org>2008-03-19 21:01:10 +0000
commit75412184f0d0324f2d1e7d756bbc34b441300309 (patch)
tree4cc95c811e7ca286be335f1c2b08884a8b401646 /sys/dev/i2c
parentUse PROM calls to enter locked kernel text and data mappings into the TLB. (diff)
downloadwireguard-openbsd-75412184f0d0324f2d1e7d756bbc34b441300309.tar.xz
wireguard-openbsd-75412184f0d0324f2d1e7d756bbc34b441300309.zip
add probe for Andigilog aSC7611; discussed with deraadt
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/i2c_scan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index 198a75facf9..76758e1ef5b 100644
--- a/sys/dev/i2c/i2c_scan.c
+++ b/sys/dev/i2c/i2c_scan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2c_scan.c,v 1.112 2007/12/05 16:35:14 deraadt Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.113 2008/03/19 21:01:10 cnst Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -591,6 +591,11 @@ iic_probe_sensor(struct device *self, u_int8_t addr)
break;
case 0x61: /* Andigilog */
if ((addr == 0x2c || addr == 0x2d || addr == 0x2e) &&
+ iicprobe(0x3f) == 0x69 &&
+ (iicprobe(0x09) & 0xbf) == 0x00 && iicprobe(0x0f) == 0x00 &&
+ (iicprobe(0x40) & 0xf0) == 0x00)
+ name = "asc7611";
+ else if ((addr == 0x2c || addr == 0x2d || addr == 0x2e) &&
iicprobe(0x3f) == 0x6c)
name = "asc7621";
break;