Messages in this thread Patch in this message | | | From | Wolfram Sang <> | Subject | [RFC 2/2] regmap: make use of cached entries in debugfs | Date | Mon, 30 Jan 2012 15:08:17 +0100 |
| |
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
| |