[alsa-devel] [PATCH v2 4/4] ASoC: rsnd: use regmap instead of original register mapping method

Mark Brown broonie at kernel.org
Tue Sep 17 15:04:02 CEST 2013


On Sun, Sep 01, 2013 at 08:32:45PM -0700, Kuninori Morimoto wrote:

> +void rsnd_write(struct rsnd_priv *priv,
> +		struct rsnd_mod *mod,
> +		enum rsnd_reg reg, u32 data)
> +{
> +	struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
> +
> +	if (regmap_fields_enable(gen->regs[reg]))
> +		regmap_fields_write(gen->regs[reg], rsnd_mod_id(mod), data);
> +	else
> +		regmap_field_write(gen->regs[reg], data);
> +}

Ah, sorry - I see you are actually using fields_enable().  I must've
searched for the wrong thing.  However looking at this I'm not sure that
this is a good use anyway, it seems like the caller should know if the
register it is writing to is in one of the repeated blocks.  Can you
provide a bit more detail as to what's going on here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20130917/dab4ac01/attachment.sig>


More information about the Alsa-devel mailing list