* [PATCH 1/2] regmap: Don't use bitfields for booleans
@ 2012-02-06 18:02 Mark Brown
2012-02-06 18:02 ` [PATCH 2/2] regmap: Add debugfs information for the cache status Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2012-02-06 18:02 UTC (permalink / raw)
To: linux-kernel; +Cc: patches, Mark Brown
This was a cut'n'paste from some older code.
Since we're about to add debugfs support don't do the obvious thing and
use bool, use u32 instead (which debugfs has been using since time
immemorial).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/base/regmap/internal.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 9ec8d8f..abd7667 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -66,16 +66,16 @@ struct regmap {
unsigned int num_reg_defaults_raw;
/* if set, only the cache is modified not the HW */
- unsigned int cache_only:1;
+ u32 cache_only;
/* if set, only the HW is modified not the cache */
- unsigned int cache_bypass:1;
+ u32 cache_bypass;
/* if set, remember to free reg_defaults_raw */
- unsigned int cache_free:1;
+ bool cache_free;
struct reg_default *reg_defaults;
const void *reg_defaults_raw;
void *cache;
- bool cache_dirty;
+ u32 cache_dirty;
struct reg_default *patch;
int patch_regs;
--
1.7.9.rc1
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 2/2] regmap: Add debugfs information for the cache status
2012-02-06 18:02 [PATCH 1/2] regmap: Don't use bitfields for booleans Mark Brown
@ 2012-02-06 18:02 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-02-06 18:02 UTC (permalink / raw)
To: linux-kernel; +Cc: patches, Mark Brown
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 | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 6f39747..b3b4b8f 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -192,6 +192,15 @@ void regmap_debugfs_init(struct regmap *map)
debugfs_create_file("access", 0400, map->debugfs,
map, ®map_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)
--
1.7.9.rc1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-06 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 18:02 [PATCH 1/2] regmap: Don't use bitfields for booleans Mark Brown
2012-02-06 18:02 ` [PATCH 2/2] regmap: Add debugfs information for the cache status Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®