diff options
author | kib <kib@FreeBSD.org> | 2014-10-27 07:51:26 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-10-27 07:51:26 +0000 |
commit | 50ca98228697dfdaf0fc837d99829e67a1cb1988 (patch) | |
tree | 1fe9392ad284bdc0192b750f9a10efc160c5a490 /sys/dev/iicbus/iicbus.h | |
parent | 99d20fccef3d3dc46bc6f613cc644c3653970cdc (diff) | |
download | FreeBSD-src-50ca98228697dfdaf0fc837d99829e67a1cb1988.zip FreeBSD-src-50ca98228697dfdaf0fc837d99829e67a1cb1988.tar.gz |
Add a method to iicbus to request IIC_M_NOSTOP behaviour for multibyte
transfers to be default. It simplifies porting code which assumes
such settings.
Discussed with: avg, llos, nwhitehorn
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Diffstat (limited to 'sys/dev/iicbus/iicbus.h')
-rw-r--r-- | sys/dev/iicbus/iicbus.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/iicbus/iicbus.h b/sys/dev/iicbus/iicbus.h index 92c250e..54fe980 100644 --- a/sys/dev/iicbus/iicbus.h +++ b/sys/dev/iicbus/iicbus.h @@ -49,16 +49,19 @@ struct iicbus_softc struct iicbus_ivar { uint32_t addr; + bool nostop; }; enum { - IICBUS_IVAR_ADDR /* Address or base address */ + IICBUS_IVAR_ADDR, /* Address or base address */ + IICBUS_IVAR_NOSTOP, /* nostop defaults */ }; #define IICBUS_ACCESSOR(A, B, T) \ __BUS_ACCESSOR(iicbus, A, IICBUS, B, T) IICBUS_ACCESSOR(addr, ADDR, uint32_t) +IICBUS_ACCESSOR(nostop, NOSTOP, bool) #define IICBUS_LOCK(sc) mtx_lock(&(sc)->lock) #define IICBUS_UNLOCK(sc) mtx_unlock(&(sc)->lock) |