summaryrefslogtreecommitdiffstats
path: root/sys/dev/i2c/i2c_scan.c
diff options
context:
space:
mode:
authorcnst <cnst@openbsd.org>2009-08-12 14:51:20 +0000
committercnst <cnst@openbsd.org>2009-08-12 14:51:20 +0000
commit143beb10e8ff221a3fd362bb03427c0bd87f96cc (patch)
treef7ae92f249c9328864c792f6ca3a15b2436ca101 /sys/dev/i2c/i2c_scan.c
parentif we get dangerously low on clusters during interrupts, we need (diff)
downloadwireguard-openbsd-143beb10e8ff221a3fd362bb03427c0bd87f96cc.tar.xz
wireguard-openbsd-143beb10e8ff221a3fd362bb03427c0bd87f96cc.zip
New lisa(4) driver for ST LIS331DL accelerometer in HP 2133 Mini-Note PC; ok deraadt
Diffstat (limited to 'sys/dev/i2c/i2c_scan.c')
-rw-r--r--sys/dev/i2c/i2c_scan.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index b06e86b9648..5235b2a5671 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.133 2009/07/10 19:58:41 cnst Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.134 2009/08/12 14:51:20 cnst Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -883,6 +883,14 @@ iic_probe_sensor(struct device *self, u_int8_t addr)
(iicprobew(0x07) & 0xffe0) == 0x0800 &&
iicprobew(0x00) == 0x001f) {
name = "cat34ts02"; /* or cat6095 */
+ } else if ((addr & 0x7e) == 0x1c && iicprobe(0x0f) == 0x3b &&
+ (iicprobe(0x21) & 0x60) == 0x00 &&
+ iicprobe(0x0f) == iicprobe(0x8f) && /* registers address is 7 bits */
+ iicprobe(0x20) == iicprobe(0xa0) &&
+ iicprobe(0x21) == iicprobe(0xa1) &&
+ iicprobe(0x22) == iicprobe(0xa2) &&
+ iicprobe(0x07) == 0x00) { /* 0x00 to 0x0e are reserved */
+ name = "lis331dl";
} else if (name == NULL &&
(addr & 0x78) == 0x48) { /* addr 0b1001xxx */
name = lm75probe();