From: Dmitry Osipenko <digetx@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Sebastian Reichel <sre@kernel.org>, linux-pm@vger.kernel.org
Subject: Re: [PATCH] power: supply: Use an rbtree rather than flat register cache
Date: Thu, 24 Feb 2022 17:10:54 +0300 [thread overview]
Message-ID: <088b1db4-6e59-0a69-104b-028510f21173@gmail.com> (raw)
In-Reply-To: <Yhd1LV9OPD/slCV8@sirena.org.uk>
24.02.2022 15:08, Mark Brown пишет:
> On Thu, Feb 24, 2022 at 02:35:42PM +0300, Dmitry Osipenko wrote:
>
>> To make it more clear.. there was no problem with "suppressing a write",
>> the problem was that regmap reads are done from the cache, and if cache
>> isn't per-initialized, then you read zeros from the cache until write is
>> made.
>
> With update_bits() that can result in an attempt to set a bit to zero
> not actually taking effect if it believes that the bit was already set
> to zero and there has been no change in the value of the register.
Alright, I tested this patch and see that there is no need to pre-init
the RBTREE cache.
I'm a bit doubtful whether this change will save us much memory since
there are 64 regs total. Nevertheless, the driver will continue to work
as before, so I'm now okay with the change.
next prev parent reply other threads:[~2022-02-24 14:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 21:43 [PATCH] power: supply: Use an rbtree rather than flat register cache Mark Brown
2022-02-24 10:54 ` Sebastian Reichel
2022-02-24 11:07 ` Dmitry Osipenko
2022-02-24 11:35 ` Dmitry Osipenko
2022-02-24 12:08 ` Mark Brown
2022-02-24 14:10 ` Dmitry Osipenko [this message]
2022-02-24 11:45 ` Mark Brown
2022-02-24 14:58 ` Dmitry Osipenko
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=088b1db4-6e59-0a69-104b-028510f21173@gmail.com \
--to=digetx@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox