diff options
-rw-r--r-- | drivers/base/regmap/internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index c22b04b2ca17..5c79526245c2 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -273,4 +273,10 @@ static inline unsigned int regmap_get_offset(const struct regmap *map, return index * map->reg_stride; } +static inline unsigned int regcache_get_index_by_order(const struct regmap *map, + unsigned int reg) +{ + return reg >> map->reg_stride_order; +} + #endif |