diff options
author | Pratyush Yadav <p.yadav@ti.com> | 2020-09-24 07:34:13 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-30 18:55:22 +0300 |
commit | 7aa5ddffe7fbafe7ef828088ba1dbc76270300c5 (patch) | |
tree | a0d6b807b712d780a3ea7f5ea0c5dfcd2346b925 /include/regmap.h | |
parent | 78aaedba9f1b92335a4f0ce8344f6abf7a63dccb (diff) | |
download | u-boot-7aa5ddffe7fbafe7ef828088ba1dbc76270300c5.tar.xz |
regmap: Allow left shifting register offset before access
Drivers can configure it to adjust the final read/write location.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/regmap.h')
-rw-r--r-- | include/regmap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/regmap.h b/include/regmap.h index 19474e6de1..e6c59dfbce 100644 --- a/include/regmap.h +++ b/include/regmap.h @@ -82,9 +82,12 @@ struct regmap_bus; * * @width: Width of the read/write operations. Defaults to * REGMAP_SIZE_32 if set to 0. + * @reg_offset_shift Left shift the register offset by this value before + * performing read or write. */ struct regmap_config { enum regmap_size_t width; + u32 reg_offset_shift; }; /** @@ -92,12 +95,15 @@ struct regmap_config { * * @width: Width of the read/write operations. Defaults to * REGMAP_SIZE_32 if set to 0. + * @reg_offset_shift Left shift the register offset by this value before + * performing read or write. * @range_count: Number of ranges available within the map * @ranges: Array of ranges */ struct regmap { enum regmap_endianness_t endianness; enum regmap_size_t width; + u32 reg_offset_shift; int range_count; struct regmap_range ranges[0]; }; |