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>
This commit is contained in:
Colin Foster 2022-03-13 15:45:24 -07:00 • committed by Mark Brown
commit 0074f3f2b1
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
3 changed files with 10 additions and 0 deletions