regmap: debugfs: Add a registers `range' file
Subsystems (2)
PATCH 1/1 regmap: debugfs: Add a registers `range' file
This file lists the register ranges in the register map. The condition to split the range is based on the actual register attributes. A range is a contiguous block of registers with the same register attributes.
---
Hi,
This is applied on top of commit fea5ecc
`regmap: debugfs: Optimize seeking within blocks of registers'
drivers/base/regmap/internal.h | 1 + drivers/base/regmap/regmap-debugfs.c | 128 ++++++++++++++++++++++++++++++++++- 2 files changed, 128 insertions(+), 1 deletion(-)
drivers/base/regmap/internal.h +1 -0
@@ -27,6 +27,7 @@ struct regmap_debugfs_off_cache {off_t max;unsigned int base_reg;unsigned int max_reg; +unsigned int reg_attr; };struct regmap_format {
drivers/base/regmap/regmap-debugfs.c +127 -1
163 lines not on this page · raw message
Signature · 1 line
1.8.1.3
drivers/base/regmap/regmap-debugfs.c static ssize_t regmap_range_read_file(struct file *file, char __user *user_buf, · line 340
Quoted 5 lines · Dimitris Papastamos
drivers/base/regmap/regmap-debugfs.c +5
-0+struct regmap_reg_range { +unsigned int start; +unsigned int end; +unsigned int attr; +};
All we ever do with this struct is
drivers/base/regmap/regmap-debugfs.c static ssize_t regmap_range_read_file(struct file *file, char __user *user_buf, · line 403
Quoted 3 lines
drivers/base/regmap/regmap-debugfs.c +3
-0+ r.start = c->base_reg; + r.end = c->max_reg; + r.attr = c->reg_attr;
pack it with the contents of a cache entry. Why not just use the cache entry directly?
Quoted 10 lines · Mark Brown
drivers/base/regmap/regmap-debugfs.c static ssize_t regmap_range_read_file(struct file *file, char __user *user_buf, · line 340
Quoted 5 lines · Dimitris Papastamos
drivers/base/regmap/regmap-debugfs.c +5
-0+struct regmap_reg_range { +unsigned int start; +unsigned int end; +unsigned int attr; +};All we ever do with this struct is
Quoted 6 lines
drivers/base/regmap/regmap-debugfs.c static ssize_t regmap_range_read_file(struct file *file, char __user *user_buf, · line 403
Quoted 3 lines
drivers/base/regmap/regmap-debugfs.c +3
-0+ r.start = c->base_reg; + r.end = c->max_reg; + r.attr = c->reg_attr;pack it with the contents of a cache entry. Why not just use the cache entry directly?
Yea, will fix and re-send.