diff options
author | Colin Foster <colin.foster@in-advantage.com> | 2022-03-14 01:45:23 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-03-18 19:53:18 +0300 |
commit | 86fc59ef818beb0e1945d17f8e734898baba7e4e (patch) | |
tree | a26c0a85d4df82f4a68c9bfbc3f2529472078311 /drivers/base/regmap/internal.h | |
parent | 2d2329787ba2e70eae330f1cecd61a9576fe65de (diff) | |
download | linux-86fc59ef818beb0e1945d17f8e734898baba7e4e.tar.xz |
regmap: add configurable downshift for addresses
Add an additional reg_downshift to be applied to register addresses before
any register accesses. An example of a device that uses this is a VSC7514
chip, which require each register address to be downshifted by two if the
access is performed over a SPI bus.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/20220313224524.399947-2-colin.foster@in-advantage.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r-- | drivers/base/regmap/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index b1905916f7af..88f710e7ce31 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -31,6 +31,7 @@ struct regmap_format { size_t buf_size; size_t reg_bytes; size_t pad_bytes; + size_t reg_downshift; size_t val_bytes; void (*format_write)(struct regmap *map, unsigned int reg, unsigned int val); |