diff options
author | Colin Foster <colin.foster@in-advantage.com> | 2022-03-14 01:45:24 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-03-18 19:53:19 +0300 |
commit | 0074f3f2b1e43d3cedd97e47fb6980db6d2ba79e (patch) | |
tree | bc31c30f65706f89a436cb67d8549a46b77db497 /drivers/base/regmap/internal.h | |
parent | 86fc59ef818beb0e1945d17f8e734898baba7e4e (diff) | |
download | linux-0074f3f2b1e43d3cedd97e47fb6980db6d2ba79e.tar.xz |
regmap: allow a defined reg_base to be added to every address
There's an inconsistency that arises when a register set can be accessed
internally via MMIO, or externally via SPI. The VSC7514 chip allows both
modes of operation. When internally accessed, the system utilizes __iomem,
devm_ioremap_resource, and devm_regmap_init_mmio.
For SPI it isn't possible to utilize memory-mapped IO. To properly operate,
the resource base must be added to the register before every operation.
Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/20220313224524.399947-3-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 88f710e7ce31..b4df36c7b17d 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -63,6 +63,7 @@ struct regmap { regmap_unlock unlock; void *lock_arg; /* This is passed to lock/unlock functions */ gfp_t alloc_flags; + unsigned int reg_base; struct device *dev; /* Device we do I/O on */ void *work_buf; /* Scratch buffer used to format I/O */ |