From b169986d816056d0c94287e92d0a5140b5fd6f90 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 13 Jan 2016 10:25:32 +0000 Subject: Don't confuse the HID descriptor address (which really is an office into the register space of the i2c device) with the i2c address. For i2c busses enumerated by ACPI we get the address from the I2C Serial Bus Connection Resource Descriptor returned by the _CRS methide of the i2c device. Pass the HID descriptor address in the ia_size member. ok jcs@ --- sys/dev/i2c/ihidev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/dev/i2c/ihidev.h') diff --git a/sys/dev/i2c/ihidev.h b/sys/dev/i2c/ihidev.h index d65498735cd..47c0e153c11 100644 --- a/sys/dev/i2c/ihidev.h +++ b/sys/dev/i2c/ihidev.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ihidev.h,v 1.1 2016/01/12 01:11:15 jcs Exp $ */ +/* $OpenBSD: ihidev.h,v 1.2 2016/01/13 10:25:31 kettenis Exp $ */ /* * HID-over-i2c driver * @@ -71,6 +71,7 @@ struct ihidev_softc { i2c_addr_t sc_addr; void *sc_ih; + u_int sc_hid_desc_addr; union { uint8_t hid_desc_buf[sizeof(struct i2c_hid_desc)]; struct i2c_hid_desc hid_desc; -- cgit v1.2.3