31 Jul
2014
31 Jul
'14
9:01 a.m.
On 07/31/2014 01:17 AM, Mark Brown wrote:
On Wed, Jul 30, 2014 at 05:56:36PM -0400, jonsmirl@gmail.com wrote:
I'm working on a TI codec attached via I2C. Just to make things interesting the registers have varying byte lengths of - 1,4,8,12,20 bytes. What's the best strategy for using regmap with it?
I'd use the reg_read() and reg_write() callbacks to hide the registers that will fit in an integer, the rest of the stack can pretend they've got 32 bit values which should improve code reuse.[...]
The adau1701 is a driver that for example does this.