This repository was archived by the owner on Nov 8, 2023. It is now read-only.
Commit 697c389
regmap: apply reg_base and reg_downshift for single register ops
reg_base and reg_downshift currently don't have any effect if used with
a regmap_bus or regmap_config which only offers single register
operations (ie. reg_read, reg_write and optionally reg_update_bits).
Fix that and take them into account also for regmap_bus with only
reg_read and read_write operations by applying reg_base and
reg_downshift in _regmap_bus_reg_write, _regmap_bus_reg_read.
Also apply reg_base and reg_downshift in _regmap_update_bits, but only
in case the operation is carried out with a reg_update_bits call
defined in either regmap_bus or regmap_config.
Fixes: 0074f3f ("regmap: allow a defined reg_base to be added to every address")
Fixes: 86fc59e ("regmap: add configurable downshift for addresses")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Colin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/Y9clyVS3tQEHlUhA@makrotopia.org
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 1b929c0 commit 697c389
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1942 | 1942 | | |
1943 | 1943 | | |
1944 | 1944 | | |
| 1945 | + | |
| 1946 | + | |
1945 | 1947 | | |
1946 | 1948 | | |
1947 | 1949 | | |
| |||
2840 | 2842 | | |
2841 | 2843 | | |
2842 | 2844 | | |
| 2845 | + | |
| 2846 | + | |
2843 | 2847 | | |
2844 | 2848 | | |
2845 | 2849 | | |
| |||
3231 | 3235 | | |
3232 | 3236 | | |
3233 | 3237 | | |
| 3238 | + | |
| 3239 | + | |
3234 | 3240 | | |
3235 | 3241 | | |
3236 | 3242 | | |
| |||
0 commit comments