Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 266959
b: refs/heads/master
c: 2efe164
h: refs/heads/master
i:
  266957: 7306312
  266955: e49c349
  266951: 8ed69e4
  266943: d3e17b2
v: v3
  • Loading branch information
Mark Brown committed Aug 8, 2011
1 parent 0c2d159 commit e6c862b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31244e396fa9e4854cfd6dfe305983e77802c156
refs/heads/master: 2efe1642b73e74604498175de032b8a604868fb7
1 change: 1 addition & 0 deletions trunk/drivers/base/regmap/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ struct regmap {
bool (*writeable_reg)(struct device *dev, unsigned int reg);
bool (*readable_reg)(struct device *dev, unsigned int reg);
bool (*volatile_reg)(struct device *dev, unsigned int reg);
bool (*precious_reg)(struct device *dev, unsigned int reg);
};

#ifdef CONFIG_DEBUG_FS
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
!map->readable_reg(map->dev, i))
continue;

if (map->precious_reg &&
map->precious_reg(map->dev, i))
continue;

/* If we're in the region the user is trying to read */
if (p >= *ppos) {
/* ...but not beyond it */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ struct regmap *regmap_init(struct device *dev,
map->writeable_reg = config->writeable_reg;
map->readable_reg = config->readable_reg;
map->volatile_reg = config->volatile_reg;
map->precious_reg = config->precious_reg;

switch (config->reg_bits) {
case 4:
Expand Down

0 comments on commit e6c862b

Please sign in to comment.