From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH v2 2/2] regmap: Drop check whether a register is readable in regcache_read
Date: Wed, 16 Nov 2011 20:34:04 +0100 [thread overview]
Message-ID: <1321472044-15686-2-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1321472044-15686-1-git-send-email-lars@metafoo.de>
One of the reasons for using a cache is to have a software shadow of a register
which is writable but not readable. This allows us to do a read-modify-write
operation on such a register.
Currently regcache checks whether a register is readable when performing a
cached read and returns an error if it is not. Drop this check, since it will
prevent us from using the cache for registers where read-back is not possible.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
Changes since v1:
* Drop the check instead of replaceing it with a check whether the register
is writable since this would break once we start adding read-back values
to the cache.
---
drivers/base/regmap/regcache.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 6d93e49..e21eebd 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -199,9 +199,6 @@ int regcache_read(struct regmap *map,
BUG_ON(!map->cache_ops);
- if (!regmap_readable(map, reg))
- return -EIO;
-
if (!regmap_volatile(map, reg))
return map->cache_ops->read(map, reg, value);
--
1.7.7.1
next prev parent reply other threads:[~2011-11-16 19:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 19:34 [PATCH v2 1/2] regmap: Properly round cache_word_size Lars-Peter Clausen
2011-11-16 19:34 ` Lars-Peter Clausen [this message]
2011-11-17 16:51 ` [PATCH v2 2/2] regmap: Drop check whether a register is readable in regcache_read Mark Brown
2011-11-17 16:51 ` [PATCH v2 1/2] regmap: Properly round cache_word_size 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=1321472044-15686-2-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dp@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®