PERFORCE change 94371 for review

Warner Losh imp at FreeBSD.org
Sat Apr 1 00:24:45 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=94371

Change 94371 by imp at imp_hammer on 2006/04/01 00:24:01

	Start supporting FreeBSD's iicbus goo

Affected files ...

.. //depot/projects/arm/src/sys/arm/at91/at91_twi.c#7 edit

Differences ...

==== //depot/projects/arm/src/sys/arm/at91/at91_twi.c#7 (text+ko) ====

@@ -416,12 +416,63 @@
 	return err;
 }
 
+static int
+at91_twi_stop(device_t dev)
+{
+	return (EIO);
+}
+
+static int
+at91_twi_repeated_start(device_t dev, u_char slave, int timeout)
+{
+	return EIO;
+}
+
+static int
+at91_twi_start(device_t dev, u_char slave, int timeout)
+{
+	struct at91_twi_softc *sc = device_get_softc(dev);
+	int error = 0;
+
+	return (0);
+error:
+	at91_twi_stop(dev);
+	return (error);
+}
+
+static int
+at91_write(device_t dev, char *buf, int len, int *sent, int timeout /* us */)
+{
+	return EIO;
+}
+
+static int
+at91_twi_read(device_t dev, char *buf, int len, int *read, int last,
+	 int delay /* us */)
+{
+	return EIO;
+}
+
+static int
+at91_twi_rst_card(device_t dev, u_char speed, u_char addr, u_char *oldaddr)
+{
+	return EIO;
+}
+
 static device_method_t at91_twi_methods[] = {
 	/* Device interface */
 	DEVMETHOD(device_probe,		at91_twi_probe),
 	DEVMETHOD(device_attach,	at91_twi_attach),
 	DEVMETHOD(device_detach,	at91_twi_detach),
 
+	/* iicbus interface */
+	DEVMETHOD(iicbus_callback,	iicbus_null_callback),
+	DEVMETHOD(iicbus_repeated_start, at91_twi_repeated_start),
+	DEVMETHOD(iicbus_start,		at91_twi_start),
+	DEVMETHOD(iicbus_stop,		at91_twi_stop),
+	DEVMETHOD(iicbus_write,		at91_twi_write),
+	DEVMETHOD(iicbus_read,		at91_twi_read),
+	DEVMETHOD(iicbus_reset,		at91_twi_rst_card),
 	{ 0, 0 }
 };
 


More information about the p4-projects mailing list