]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: core: allow a virtual range to cover its own data window
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 23 Jul 2013 10:16:02 +0000 (12:16 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 6 Aug 2013 17:33:59 +0000 (18:33 +0100)
commit56dc27f204de836ed34fa99f727bd947f705e64d
tree2baf0f821d547749eb9f32b34fed75a38255bffd
parented880b9baffd6d96a1025a205af229851349ff5d
regmap: core: allow a virtual range to cover its own data window

I see no reason why a virtual range shouldn't be allowed to cover its
own data window if the page selection register is in the same place
on every page.
For chips which use paged access for all of their registers, but only
when connected via I2C, and which can access the whole register space
directly when connected via SPI, this allows to avoid acrobatics with
the register ranges by simply mapping the I2C ranges over the data
window beginning at 0x0, and then using linear access for the SPI
variant.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regmap.c