All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap: debugfs: "registers" & "access" for single register maps
@ 2014-01-30 13:26 Pawel Moll
  2014-01-30 16:51 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Moll @ 2014-01-30 13:26 UTC (permalink / raw)
  To: Mark Brown, linux-kernel; +Cc: Pawel Moll

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>
---
 drivers/base/regmap/regmap-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index c5471cd..45d812c 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -511,7 +511,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
 	debugfs_create_file("range", 0400, map->debugfs,
 			    map, &regmap_reg_ranges_fops);
 
-	if (map->max_register) {
+	if (map->max_register || regmap_readable(map, 0)) {
 		debugfs_create_file("registers", 0400, map->debugfs,
 				    map, &regmap_map_fops);
 		debugfs_create_file("access", 0400, map->debugfs,
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regmap: debugfs: "registers" & "access" for single register maps
  2014-01-30 13:26 [PATCH] regmap: debugfs: "registers" & "access" for single register maps Pawel Moll
@ 2014-01-30 16:51 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-01-30 16:51 UTC (permalink / raw)
  To: Pawel Moll; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

On Thu, Jan 30, 2014 at 01:26:32PM +0000, Pawel Moll wrote:
> 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.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-30 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 13:26 [PATCH] regmap: debugfs: "registers" & "access" for single register maps Pawel Moll
2014-01-30 16:51 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.