[alsa-devel] [PATCH] ASoC: rsnd: Protect register accesses with a spinlock instead of a mutex

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Jul 28 10:33:43 CEST 2014


Hi Lars

> > But it (= base address mapping was not fixed between Gen1 and Gen2)
> > was the reason why I was asked to use regmap_fields
> >
> 
> I think that is fine. But you are only using a single regmap instance even 
> though there are multiple unrelated register maps used and then you specify 
> the offset in the regmap_fields as a absolute address. This is supposed to 
> be a relative offset to the base address.
> 
> So basically use: ".reg = offset" instead of ".reg = (unsigned 
> int)gen->base[reg_id] + offset" and when creating the field instead of 
> passing a global regmap instance pass the regmap instance for the register 
> map in who's range the register falls.

Hmm... I re-checked it, and I could understand.
And, indeed it was hackish.
OK, I try to modify it, then, it seems can use regmap-mmio.



More information about the Alsa-devel mailing list