All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Using regmap_update_bits to update a write only register
Date: Fri, 06 Mar 2015 18:36:23 +0100	[thread overview]
Message-ID: <54F9E597.2050301@metafoo.de> (raw)
In-Reply-To: <CAEnQRZCb_S1ngMs+VQhMacKNVPf552qeaoPJ6YPydaHHOmRXzA@mail.gmail.com>

On 03/06/2015 06:26 PM, Daniel Baluta wrote:
[...]
> I can reproduce the problem with:
>
> static struct reg_default xxx_reg_defaults[] = {
>          { XXX_REG_CTRL0,  0x00 },
>          { XXX_REG_CTRL1,  0x00 },
>          { XXX_REG_STATUS, 0x00 },
> };
>
> but, not if the reg default definition is:
>
> static struct reg_default xxx_reg_defaults[] = {
>          { XXX_REG_STATUS, 0x00 },
>          { XXX_REG_CTRL0,  0x00 },
>          { XXX_REG_CTRL1,  0x00 },
>    };
>
> Is this normal?

That's a rhetorical question, right?

It might be that there is a bug when growing a rbblock to the left. It 
probably went unnoticed because everybody has their reg defaults ordered in 
ascending order.

Try to put a few debug printks into regcache_rbtree_write() and 
regcache_rbtree_insert_to_block() to see what exactly is going on when a new 
register is inserted into the block. How do base_reg and top_reg change.

- Lars

  reply	other threads:[~2015-03-06 17:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 17:35 Using regmap_update_bits to update a write only register Daniel Baluta
2015-03-05 17:53 ` Mark Brown
     [not found]   ` <CAEnQRZCb0k7_W1gt7qCTqbQqDwzJ_bJkDYS1FHthKTA8sP19Qg@mail.gmail.com>
2015-03-06 11:21     ` Mark Brown
2015-03-06 12:45       ` Lars-Peter Clausen
2015-03-06 13:27         ` Daniel Baluta
2015-03-06 17:26           ` Daniel Baluta
2015-03-06 17:36             ` Lars-Peter Clausen [this message]
2015-03-06 17:39               ` Lars-Peter Clausen
2015-03-06 19:48               ` Daniel Baluta
2015-03-07 11:06                 ` Mark Brown
2015-03-07 16:07                 ` Lars-Peter Clausen
2015-03-07 11:05           ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F9E597.2050301@metafoo.de \
    --to=lars@metafoo.de \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.