Date: Mon, 3 Apr 2006 19:31:08 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94551 for review Message-ID: <200604031931.k33JV8X6041991@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94551 Change 94551 by imp@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),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604031931.k33JV8X6041991>