Am 07.10.2012 04:56, schrieb Devin Heitmueller: > On Sat, Oct 6, 2012 at 7:56 AM, Mauro Carvalho Chehab > <mchehab@xxxxxxxxxx> wrote: >> AFAIKT, newer em28xx chips are using this concept. The em28xx-i2c code require >> changes to support two I2C buses, and to handle 16 bit eeproms. We never cared >> of doing that because we never needed, so far, to read anything from those >> devices' eeproms. > I actually wrote the code to read the 16-bit eeprom from the em2874, > but removed it before submitting it upstream because I was afraid > well-intentioned em28xx users trying to add support for their boards > would trash their eeprom. This is because performing a read against a > 16-bit eeprom is equivalent to a write on an 8-bit eeprom. Hence if > the user didn't know what he/she was doing, and used the 16-bit eeprom > code against an older eeprom, the eeprom would get trashed (this > actually happened to me once when I was doing the em2874 device > support originally). Yes, I've read the comment in the code... According to the (possibly outdated) em2580/em2585 datasheet I've found, these chips support 16bit eeproms ONLY. What do we know about the others ? Are there any chips which support both 8bit and 16bit eeproms ? Maybe we can make it depending on the chip_id. With regards to eeprom type probing: I've made some experiments to find out what happens when trying to access the 16bit eeprom in my device as 8bit eeprom. My hope was to get a clear result like an i2c error, no data or all bytes beeing 0x00 or 0xff. Unfortunately, there is no error and I'm getting random data (would have to cerify if it's really "random"). So probing will be difficult. > If we really want that code back in the tree, I can dig it up -- but I > won't be responsible for users killing their devices. Indeed, we should be very careful. Regards, Frank > Devin > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html