30 Jul
2014
30 Jul
'14
11:56 p.m.
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?
My idea was to make five sparse regmaps, one for each of the five lengths? Chip has about 75 registers. The 20 byte ones are biquad coefficients.
Also, does regmap restore MMIO registers after a suspend? Allwinner has code in their drivers for drivers for saving/restoring the DAI registers over a suspend.
Sven Brandau made a really nice driver for the sta350, I'm using it as a guide. The chips are fairly similar. But no variable length registers on that chip.
--
Jon Smirl
jonsmirl@gmail.com