PERFORCE change 94551 for review
Warner Losh
imp at FreeBSD.org
Mon Apr 3 19:31:09 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94551
Change 94551 by imp at imp_Speedy on 2006/04/03 19:30:42
Need callback, I think, for request/release bus. If not for this,
then for the specialized iicbus bridges that we're going to use in
our design.
Affected files ...
.. //depot/projects/arm/src/sys/arm/at91/at91_twi.c#9 edit
Differences ...
==== //depot/projects/arm/src/sys/arm/at91/at91_twi.c#9 (text+ko) ====
@@ -42,6 +42,8 @@
#include <arm/at91/at91_twireg.h>
#include <arm/at91/at91_twiio.h>
+#include <dev/iicbus/iiconf.h>
+#include <dev/iicbus/iicbus.h>
#include "iicbus_if.h"
struct at91_twi_softc
@@ -455,6 +457,25 @@
return EIO;
}
+static int
+at91_twi_callback(device_t dev, int index, caddr_t *data)
+{
+ int error = 0;
+
+ switch (index) {
+ case IIC_REQUEST_BUS:
+ break;
+
+ case IIC_RELEASE_BUS:
+ break;
+
+ default:
+ error = EINVAL;
+ }
+
+ return (error);
+}
+
static device_method_t at91_twi_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, at91_twi_probe),
@@ -462,7 +483,7 @@
DEVMETHOD(device_detach, at91_twi_detach),
/* iicbus interface */
-// DEVMETHOD(iicbus_callback, iicbus_null_callback),
+ DEVMETHOD(iicbus_callback, at91_twi_callback),
DEVMETHOD(iicbus_repeated_start, at91_twi_repeated_start),
DEVMETHOD(iicbus_start, at91_twi_start),
DEVMETHOD(iicbus_stop, at91_twi_stop),
More information about the p4-projects
mailing list