]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
regmap: Add debugfs information for the cache status
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 6 Feb 2012 18:02:06 +0000 (18:02 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 6 Feb 2012 19:24:46 +0000 (19:24 +0000)
Show all the cache status flags in debugfs if we have a cache.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regmap-debugfs.c

index 6f397476e27c010fd938dfd05b84eb68fcef7c77..b3b4b8f7f409f6fe9a1b7e291fadc4e763d2d536 100644 (file)
@@ -192,6 +192,15 @@ void regmap_debugfs_init(struct regmap *map)
                debugfs_create_file("access", 0400, map->debugfs,
                                    map, &regmap_access_fops);
        }
+
+       if (map->cache_type) {
+               debugfs_create_bool("cache_only", 0400, map->debugfs,
+                                   &map->cache_only);
+               debugfs_create_bool("cache_dirty", 0400, map->debugfs,
+                                   &map->cache_dirty);
+               debugfs_create_bool("cache_bypass", 0400, map->debugfs,
+                                   &map->cache_bypass);
+       }
 }
 
 void regmap_debugfs_exit(struct regmap *map)