On 09/05/2011 07:29 PM, Mark Brown wrote:
On Mon, Sep 05, 2011 at 03:18:01PM +0200, Lars-Peter Clausen wrote:
Currently a codec can either do the whole regmap initialization on its own or provide only the register and value bit size and let the core handle initialization. This patch allows a codec to provide a complete regmap configuration while still letting ASoC core handle the regmap initialization and setup.
I'd rather not do this, the only value is the copying of the word size setup out of the regmap config is to allow us to use the ASoC cache code but the idea is to push the cache down out of ASoC into the regmap code so this function should just be a trivial indirection for the regmap init which isn't useful.
I think it is useful, since we avoid duplicating that ugly switch statement and we also have to wrap regmap_write and regmap_read, duplicating that in each codec driver doesn't make sense.