diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-09-05 20:46:33 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-09 11:13:31 -0700 |
commit | 30ab1e78864ca5781de5b1fb501bed9df2c215f1 (patch) | |
tree | fa785b5c39bce0dcc9652e062f31c276e0f6b80e /include/linux | |
parent | 4ae7335dae2d9378a594bdb0845c55f370516864 (diff) |
ASoC: ad193x: Setup regmap read and write flag masks for SPI
Currently register read-back for the ad193x is broken, because it expects bit 0
of the upper byte to be set to indicate a read operation, while the regmap
default for SPI is to use bit 7.
This patch also addresses another oddity of the device. There are SPI and I2C
versions of this codec. In both cases the registers are 8-bit wide and numbered
from 0x0 to 0x10, but in the SPI case there is also a so called
'global address' which is prefixed in-front of the register address. The global
address mimics I2C behaviour and includes a static device address the and the
read/write flag. This basically extends the register address to an 16-bit value
numbered from 0x800 to 0x810. These are the register numbers which are
currently used by the driver. This works, because I2C will ignore the upper
8 bits of the register, but it is still a bit confusing, as there are no such
register numbers in the I2C case.
The approach taken by this patch is to number the registers from 0x00 to 0x10
and encode the global address for SPI mode into the read and write flag masks.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions