提交 676970da 编写于 作者: P Pawel Moll 提交者: Mark Brown

regmap: debugfs: "registers" & "access" for single register maps

When a map covers a single register, max_register is equal
to 0, so the "registers" & "access" files were not created.
Now they will be, as register 0 must be readable for such
map to make sense.
Signed-off-by: NPawel Moll <pawel.moll@arm.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 38dbfb59
...@@ -511,7 +511,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name) ...@@ -511,7 +511,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
debugfs_create_file("range", 0400, map->debugfs, debugfs_create_file("range", 0400, map->debugfs,
map, &regmap_reg_ranges_fops); map, &regmap_reg_ranges_fops);
if (map->max_register) { if (map->max_register || regmap_readable(map, 0)) {
debugfs_create_file("registers", 0400, map->debugfs, debugfs_create_file("registers", 0400, map->debugfs,
map, &regmap_map_fops); map, &regmap_map_fops);
debugfs_create_file("access", 0400, map->debugfs, debugfs_create_file("access", 0400, map->debugfs,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册