mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 16:53:54 +08:00
Merge remote-tracking branches 'regmap/fix/cache', 'regmap/fix/debugfs' and 'regmap/fix/volatile' into regmap-linus
This commit is contained in:
commit
d3b0533987
@ -146,6 +146,9 @@ struct regcache_ops {
|
||||
enum regcache_type type;
|
||||
int (*init)(struct regmap *map);
|
||||
int (*exit)(struct regmap *map);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
void (*debugfs_init)(struct regmap *map);
|
||||
#endif
|
||||
int (*read)(struct regmap *map, unsigned int reg, unsigned int *value);
|
||||
int (*write)(struct regmap *map, unsigned int reg, unsigned int value);
|
||||
int (*sync)(struct regmap *map, unsigned int min, unsigned int max);
|
||||
|
@ -194,10 +194,6 @@ static void rbtree_debugfs_init(struct regmap *map)
|
||||
{
|
||||
debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops);
|
||||
}
|
||||
#else
|
||||
static void rbtree_debugfs_init(struct regmap *map)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static int regcache_rbtree_init(struct regmap *map)
|
||||
@ -222,8 +218,6 @@ static int regcache_rbtree_init(struct regmap *map)
|
||||
goto err;
|
||||
}
|
||||
|
||||
rbtree_debugfs_init(map);
|
||||
|
||||
return 0;
|
||||
|
||||
err:
|
||||
@ -532,6 +526,9 @@ struct regcache_ops regcache_rbtree_ops = {
|
||||
.name = "rbtree",
|
||||
.init = regcache_rbtree_init,
|
||||
.exit = regcache_rbtree_exit,
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
.debugfs_init = rbtree_debugfs_init,
|
||||
#endif
|
||||
.read = regcache_rbtree_read,
|
||||
.write = regcache_rbtree_write,
|
||||
.sync = regcache_rbtree_sync,
|
||||
|
@ -698,7 +698,7 @@ int regcache_sync_block(struct regmap *map, void *block,
|
||||
unsigned int block_base, unsigned int start,
|
||||
unsigned int end)
|
||||
{
|
||||
if (regmap_can_raw_write(map))
|
||||
if (regmap_can_raw_write(map) && !map->use_single_rw)
|
||||
return regcache_sync_block_raw(map, block, cache_present,
|
||||
block_base, start, end);
|
||||
else
|
||||
|
@ -538,6 +538,9 @@ void regmap_debugfs_init(struct regmap *map, const char *name)
|
||||
|
||||
next = rb_next(&range_node->node);
|
||||
}
|
||||
|
||||
if (map->cache_ops && map->cache_ops->debugfs_init)
|
||||
map->cache_ops->debugfs_init(map);
|
||||
}
|
||||
|
||||
void regmap_debugfs_exit(struct regmap *map)
|
||||
|
@ -109,7 +109,7 @@ bool regmap_readable(struct regmap *map, unsigned int reg)
|
||||
|
||||
bool regmap_volatile(struct regmap *map, unsigned int reg)
|
||||
{
|
||||
if (!regmap_readable(map, reg))
|
||||
if (!map->format.format_write && !regmap_readable(map, reg))
|
||||
return false;
|
||||
|
||||
if (map->volatile_reg)
|
||||
|
Loading…
Reference in New Issue
Block a user