mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
2d2329787b
commit
86fc59ef81
3 changed files with 9 additions and 0 deletions
|
@ -237,6 +237,8 @@ typedef void (*regmap_unlock)(void *);
|
|||
* @reg_stride: The register address stride. Valid register addresses are a
|
||||
* multiple of this value. If set to 0, a value of 1 will be
|
||||
* used.
|
||||
* @reg_downshift: The number of bits to downshift the register before
|
||||
* performing any operations.
|
||||
* @pad_bits: Number of bits of padding between register and value.
|
||||
* @val_bits: Number of bits in a register value, mandatory.
|
||||
*
|
||||
|
@ -360,6 +362,7 @@ struct regmap_config {
|
|||
|
||||
int reg_bits;
|
||||
int reg_stride;
|
||||
int reg_downshift;
|
||||
int pad_bits;
|
||||
int val_bits;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue