diff options
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r-- | drivers/base/regmap/internal.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index fcafc5b2e65..606b83d7545 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -26,8 +26,8 @@ struct regmap_format { size_t val_bytes; void (*format_write)(struct regmap *map, unsigned int reg, unsigned int val); - void (*format_reg)(void *buf, unsigned int reg); - void (*format_val)(void *buf, unsigned int val); + void (*format_reg)(void *buf, unsigned int reg, unsigned int shift); + void (*format_val)(void *buf, unsigned int val, unsigned int shift); unsigned int (*parse_val)(void *buf); }; @@ -52,6 +52,9 @@ struct regmap { u8 read_flag_mask; u8 write_flag_mask; + /* number of bits to (left) shift the reg value when formatting*/ + int reg_shift; + /* regcache specific members */ const struct regcache_ops *cache_ops; enum regcache_type cache_type; |