lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 2/2] regmap: make use of cached entries in debugfs
Date
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


\
 
 \ /
  Last update: 2012-01-30 15:11    [W:0.041 / U:9.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site