On Mon, Nov 03, 2014 at 02:31:41AM +0000, Oder Chiou wrote:
Sorry, I'm not quite following what you're saying here - if you're saying that they're slightly different to the main register map I/O for this device then it's OK to create two regmaps and only access the DSP one through separate functions.
Sorry for my weak explanations. In this codec, there are 2 access modes, and it only can be chosen one mode at the same time. In codec mode, we use the normal access method to access codec settings, and in DSP mode, we also can access the codec settings, but it should use the method of memory address map to access. Ex. If we want to access the MX-01 in the DSP mode, we need to convert to memory address 0x18020000 + (01 * 2). We want to use the same regmap table to handle the codec settings, so the customize r/w functions are needed in it. In the DSP mode, the registers MX-00 ~ MX-04 are used for DSP address access, so it also need the native function to avoid the regmap handle, thanks.
So, I think what's being said here is that the CODEC has two I/O modes which you can switch between at runtime and you want to do that switching. One way to deal with this would be to just go into DSP mode immediately on power up since it's hard to see a *big* cost in that.
Another way which is more in line with what you have would be to have a regmap like you do with reg_read() and reg_write() operations but instead of switching between open coded functions switch between two regmaps which just have physical I/O defined (no register cache or anything). You then have three regmaps - the master regmap that ASoC sees and which has the cache and the two physical regmaps which do the actual I/O.