Date: Tue, 4 Apr 2006 23:59:03 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94647 for review Message-ID: <200604042359.k34Nx32a053095@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94647 Change 94647 by imp@imp_Speedy on 2006/04/04 23:58:13 Attaching the iic device causes problems, for reasons as yet unknown. Affected files ... .. //depot/projects/arm/src/sys/dev/iicbus/iicbus.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/dev/iicbus/iicbus.c#2 (text+ko) ==== @@ -81,8 +81,8 @@ static int iicbus_probe(device_t dev) { + device_set_desc(dev, "Philips I2C bus"); - return (0); } @@ -139,54 +139,56 @@ printf("\n"); #endif + device_add_child(dev, "ic", -1); + device_add_child(dev, "iicsmb", -1); +#if 0 /* attach any known device */ - device_add_child(dev, "ic", -1); device_add_child(dev, "iic", -1); - device_add_child(dev, "iicsmb", -1); - +#endif bus_generic_attach(dev); - return (0); } static int iicbus_detach(device_t dev) { + iicbus_reset(dev, IIC_FASTEST, 0, NULL); - bus_generic_detach(dev); - return (0); } static int iicbus_add_child(device_t dev, int order, const char *name, int unit) { + device_add_child_ordered(dev, order, name, unit); - bus_generic_attach(dev); - return (0); } int iicbus_generic_intr(device_t dev, int event, char *buf) { + return (0); } int iicbus_null_callback(device_t dev, int index, caddr_t data) { + return (0); } int iicbus_null_repeated_start(device_t dev, u_char addr) { + return (IIC_ENOTSUPP); } +DRIVER_MODULE(iicbus, at91_twi, iicbus_driver, iicbus_devclass, 0, 0); DRIVER_MODULE(iicbus, pcf, iicbus_driver, iicbus_devclass, 0, 0); DRIVER_MODULE(iicbus, envctrl, iicbus_driver, iicbus_devclass, 0, 0); DRIVER_MODULE(iicbus, iicbb, iicbus_driver, iicbus_devclass, 0, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604042359.k34Nx32a053095>