Hi! > >>Could you switch to using regmap for the whole driver, please? > > > >If I read the regmap_i2c code correctly, it cannot handle this. If one > >register is 1 byte wide, and other is 5 bytes, it won't work. Btw it is > > regmap mechanism is very flexible and takes into account virtually > all existing use cases. > > You can use regmap_bulk_write() for writing an array of bytes. > > >not a regmap at all, this is a command interface. You can't read > >information back from the controller for each "register". > > You can read it back since it will be cached in a regmap cache, > unless you mark a register volatile, then the regmap will do the > i2c readout, provided it is marked readable in the regmap config. While regmap may be able to handle this, it does not seem to offer any advantage here. I believe code is good as-is. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature