From: Wolfram Sang <w.sang@pengutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Wolfram Sang <w.sang@pengutronix.de>
Subject: [RFC 2/2] regmap: make use of cached entries in debugfs
Date: Mon, 30 Jan 2012 15:08:17 +0100 [thread overview]
Message-ID: <1327932497-28319-2-git-send-email-w.sang@pengutronix.de> (raw)
In-Reply-To: <1327932497-28319-1-git-send-email-w.sang@pengutronix.de>
Currently, registers not marked as readable won't be displayed via
debugfs. So, a chip with write-only registers shows nothing because of
no readable registers, although regcache knows the current values. Fix
debugfs to only require the readable-flag when no cache is active,
otherwise try reading the cache.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
drivers/base/regmap/regmap-debugfs.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 6f39747..c5a57f3 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -58,7 +58,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
tot_len = reg_len + val_len + 3; /* : \n */
for (i = 0; i < map->max_register + 1; i++) {
- if (!regmap_readable(map, i))
+ if (map->cache_type == REGCACHE_NONE && !regmap_readable(map, i))
continue;
if (regmap_precious(map, i))
--
1.7.8.3
next prev parent reply other threads:[~2012-01-30 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 14:08 [RFC 1/2] regmap: if format_write is used, declare all registers as "unreadable" Wolfram Sang
2012-01-30 14:08 ` Wolfram Sang [this message]
2012-01-30 14:56 ` [RFC 2/2] regmap: make use of cached entries in debugfs Mark Brown
2012-01-30 15:34 ` Wolfram Sang
2012-01-30 16:11 ` Mark Brown
2012-01-30 16:25 ` [RFC 1/2] regmap: if format_write is used, declare all registers as "unreadable" 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=1327932497-28319-2-git-send-email-w.sang@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lars@metafoo.de \
--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®