mirror of
https://github.com/torvalds/linux.git
synced 2024-12-10 13:12:04 +00:00
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: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
38dbfb59d1
commit
676970da5c
@ -511,7 +511,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
|
||||
debugfs_create_file("range", 0400, map->debugfs,
|
||||
map, ®map_reg_ranges_fops);
|
||||
|
||||
if (map->max_register) {
|
||||
if (map->max_register || regmap_readable(map, 0)) {
|
||||
debugfs_create_file("registers", 0400, map->debugfs,
|
||||
map, ®map_map_fops);
|
||||
debugfs_create_file("access", 0400, map->debugfs,
|
||||
|
Loading…
Reference in New Issue
Block a user