Date: Tue, 28 Nov 2006 01:57:50 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 110611 for review Message-ID: <200611280157.kAS1vocf034590@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110611 Change 110611 by imp@imp_lighthouse on 2006/11/28 01:57:40 Add new driver "icee" for reading IIC EEPROM devices. So far just tested for 8-bit devices. write to follow. Affected files ... .. //depot/projects/arm/src/sys/arm/conf/TSC4370#17 edit .. //depot/projects/arm/src/sys/conf/files#55 edit .. //depot/projects/arm/src/sys/dev/iicbus/icee.c#1 add .. //depot/projects/arm/src/sys/dev/iicbus/iic.c#10 edit Differences ... ==== //depot/projects/arm/src/sys/arm/conf/TSC4370#17 (text+ko) ==== @@ -102,6 +102,7 @@ # iic device iic device iicbus +device icee # SPI bus device spibus device at45d # at45db642 and maybe others ==== //depot/projects/arm/src/sys/conf/files#55 (text+ko) ==== @@ -666,6 +666,7 @@ dev/ieee488/upd7210.c optional pcii | tnt4882 dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ds1672.c optional ds1672 +dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic dev/iicbus/iicbb.c optional iicbb ==== //depot/projects/arm/src/sys/dev/iicbus/iic.c#10 (text+ko) ==== @@ -249,9 +249,8 @@ if (!sc) return (EINVAL); - if ((error = iicbus_request_bus(device_get_parent(iicdev), iicdev, - (flags & O_NONBLOCK) ? IIC_DONTWAIT : - (IIC_WAIT | IIC_INTR)))) + if ((error = iicbus_request_bus(parent, iicdev, + (flags & O_NONBLOCK) ? IIC_DONTWAIT : (IIC_WAIT | IIC_INTR)))) return (error); switch (cmd) { @@ -314,7 +313,7 @@ if (!(m->flags & IIC_M_RD)) copyin(usrbufs[i], m->buf, m->len); } - error = iicbus_transfer(parent, (struct iic_msg *)buf, d->nmsgs); + error = iicbus_transfer(iicdev, (struct iic_msg *)buf, d->nmsgs); /* Copyout all read segments, free up kernel buffers */ for (i = 0; i < d->nmsgs; i++) { m = &((struct iic_msg *)buf)[i]; @@ -328,7 +327,7 @@ error = ENOTTY; } - iicbus_release_bus(device_get_parent(iicdev), iicdev); + iicbus_release_bus(parent, iicdev); if (buf != NULL) free(buf, M_TEMP);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611280157.kAS1vocf034590>