[alsa-devel] [PATCH RESEND v2 2/4] ASoC: cs42l52: increase MAX_REGISTER for regmap_register_patch

Brian Austin brian.austin at cirrus.com
Fri Oct 25 19:49:50 CEST 2013

On Fri, 25 Oct 2013, Mark Brown wrote:

> On Fri, Oct 25, 2013 at 10:01:15AM -0500, Brian Austin wrote:
>> regmap_register_patch fails without the MAX_REGISTER set to highest
>> register written to. Increase to register 0x47
> Hrm.  It probably shouldn't be doing that, unless there's some great
> reason I've not thought of - this is for random undocumented registers
> which we ought to be able to exclude from the the register map that
> Linux knows about.  What's the root cause?
I thought this odd as well, but if I do not have a .max_register defined 
that is >= a register in the patch function, it will fail at that 
register. It does make sense that we should not have to define or mention 
chicken bits for this stuff.

Could it be related to this?

int regmap_register_patch(struct regmap *map, const struct reg_default 
*regs, int num_regs)

/* Write out first; it's useful to apply even if we fail later. */
 	for (i = 0; i < num_regs; i++) {
 		ret = _regmap_write(map, regs[i].reg, regs[i].def);
 		if (ret != 0) {
 			dev_err(map->dev, "Failed to write %x = %x: %d\n",
 				regs[i].reg, regs[i].def, ret);
 			goto out;

But it does not seem to apply later.
I believe that if I call regcache_cache_bypass it might work.

More information about the Alsa-devel mailing list