diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2005-12-13 19:21:46 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2005-12-13 19:21:46 +0000 |
commit | 686708f227fab1dd0666f0fcce4dc651f4479d04 (patch) | |
tree | 05c0702208a4f90b15c30258f1388526e061a51f /sys/arch/macppc/dev/ki2cvar.h | |
parent | 58e72beb4fe8203520b4d7b7c081d9b1acdca444 (diff) |
Deal with ki2c(4) controllers with multiple i2c busses.
tested by xsa@
Diffstat (limited to 'sys/arch/macppc/dev/ki2cvar.h')
-rw-r--r-- | sys/arch/macppc/dev/ki2cvar.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/macppc/dev/ki2cvar.h b/sys/arch/macppc/dev/ki2cvar.h index 378bac8cc91..4a8c39b559d 100644 --- a/sys/arch/macppc/dev/ki2cvar.h +++ b/sys/arch/macppc/dev/ki2cvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ki2cvar.h,v 1.3 2005/11/14 22:29:35 deraadt Exp $ */ +/* $OpenBSD: ki2cvar.h,v 1.4 2005/12/13 19:21:45 kettenis Exp $ */ /*- * Copyright (c) 2001 Tsubai Masanari. All rights reserved. @@ -82,14 +82,20 @@ #define I2C_READING 0x02 #define I2C_ERROR 0x04 +#define KI2C_MAX_BUSSES 2 + struct ki2c_softc { struct device sc_dev; paddr_t sc_paddr; u_char *sc_reg; int sc_regstep; - struct i2c_controller sc_i2c_tag; struct lock sc_buslock; + struct ki2c_bus { + struct ki2c_softc *sc; + struct i2c_controller i2c_tag; + u_int32_t reg; + } sc_bus[KI2C_MAX_BUSSES]; int sc_flags; u_char *sc_data; |