regmap: add configurable downshift for addresses
authorColin Foster <colin.foster@in-advantage.com>
Sun, 13 Mar 2022 22:45:23 +0000 (15:45 -0700)
committerMark Brown <broonie@kernel.org>
Fri, 18 Mar 2022 16:53:18 +0000 (16:53 +0000)
commit86fc59ef818beb0e1945d17f8e734898baba7e4e
treea26c0a85d4df82f4a68c9bfbc3f2529472078311
parent2d2329787ba2e70eae330f1cecd61a9576fe65de
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>
drivers/base/regmap/internal.h
drivers/base/regmap/regmap.c
include/linux/regmap.h