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: Sat, 07 Mar 2015 17:07:39 +0100 [thread overview]
Message-ID: <54FB224B.1020308@metafoo.de> (raw)
In-Reply-To: <CAEnQRZBcvku90tUeogz2coLcbh-77df6j2T99TNJWxmAmteSBQ@mail.gmail.com>
On 03/06/2015 08:48 PM, Daniel Baluta wrote:
> On Fri, Mar 6, 2015 at 7:36 PM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>> 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.
>
> I cannot test is right now because I don't have access to the physical device.
> Is there a way to use to test the regmap API without an I2C/SPI device?
I did some quick testing today, and the resizing the present bitmap
definitely broken with the current code. Patch will follow shortly.
- Lars
next prev parent reply other threads:[~2015-03-07 16:07 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
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 [this message]
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=54FB224B.1020308@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.