Subject: Re: Sharing MII and I2C code in ethernet drivers
To: None <tech-kern@NetBSD.ORG>
From: Mike Long <mikel@shore.net>
List: tech-kern
Date: 09/19/1997 03:09:25
>Date: Thu, 18 Sep 1997 16:01:24 +0200
>From: Manuel BOUYER <bouyer@antioche.lip6.fr>

>For the EEPROM, the driver need to export 2 functions: read a byte at an
>adress, and write a bit at an adress. The controller chip driver need to
>export the functions for controlling and reading the bus lines (set/clear/read
>for 3 control lines, so 9 functions). The protocol for reading and writing
>a byte may change from an EEPROM to antother.
>The driver for the microchip 24c01A could stand in a new sys/dev/i2c directory.

All I2C-interface EEPROMs use the same protocol, so it might be better
not to associate the number of one particular EEPROM (24C01A) with the
driver.

Also, you can't write individual bits in one of those EEPROMs; writes
are byte-wide.
-- 
Mike Long <mikel@shore.net>                http://www.shore.net/~mikel
"Every normal man must be tempted at times to spit on his hands,
hoist the black flag, and begin slitting throats." -- H.L. Mencken