> > /* > > * FIXME: What to do if only 8 bits of a 16 bit address are sent? > > * The <your vendor & eeprom type> sends only 0xff then. Needs verification > > * with other EEPROMs, though. We currently use the 8 bit as a valid > > * address. > > */ > > > > The eeprom tested is from ST, model M24C64. Should this be added in the code > or in some doc folder? I think FIXMEs should be in the source itself. > I have another question. I'm considering adding a flag to set the virtual > eeprom in read-only mode on the i2c side (but writable from the sysfs side). > Should this be implemented as a separate i2c_device_id, or by trying to read > som configuration flag from devicetree? Hmm, not sure yet. There is the "read-only" DT binding which makes it easy but I see two drawbacks: 1) I am not a big fan of describing slave functionality in DT because to me this is more configuration than hardware description. I know mileages vary on this one. 2) This is a DT only solution. If we want to support read-only when instantiating from userspace, we'd need a seperate mechanism to configure that, like a sysfs-entry. This adds quite some code. I currently think a seperate id like "24c02ro" will keep things nicely simple. Obviously, this solution doesn't scale with number of features. Having a look at the original AT24 driver, I wouldn't expect other new features coming. Thoughts?
Attachment:
signature.asc
Description: PGP signature