summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tlv320aic26.h
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-25 16:29:44 +0400
committerMark Brown <broonie@linaro.org>2013-09-25 16:30:59 +0400
commit7fbdeb809050cb958f3baa83dcc643f9a2f287f2 (patch)
treeb7e9f3973279ba2a4af4d3f3cd631abe7d2ef128 /sound/soc/codecs/tlv320aic26.h
parent5b0959d472c215e6d712ac47e64110bd125ddd07 (diff)
downloadlinux-7fbdeb809050cb958f3baa83dcc643f9a2f287f2.tar.xz
ASoC: tlv320aic26: Convert to direct regmap API usage
This moves us towards being able to remove the duplicated register I/O code in ASoC. The datasheet and the driver document the device as having a register map divided into pages but since the paging is actually done by sending the page address and the register address with each transaction this is no different to having a simple register address. The datasheet does also document the low five bits of the 16 bit "command" as unused which we could represent as padding but it seems simpler and less confusing to things that use block transfers or autoincrement to represent these as part of the register address. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.h')
-rw-r--r--sound/soc/codecs/tlv320aic26.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic26.h b/sound/soc/codecs/tlv320aic26.h
index 67f19c3bebe6..629b85e75409 100644
--- a/sound/soc/codecs/tlv320aic26.h
+++ b/sound/soc/codecs/tlv320aic26.h
@@ -9,10 +9,7 @@
#define _TLV320AIC16_H_
/* AIC26 Registers */
-#define AIC26_READ_COMMAND_WORD(addr) ((1 << 15) | (addr << 5))
-#define AIC26_WRITE_COMMAND_WORD(addr) ((0 << 15) | (addr << 5))
-#define AIC26_PAGE_ADDR(page, offset) ((page << 6) | offset)
-#define AIC26_NUM_REGS AIC26_PAGE_ADDR(3, 0)
+#define AIC26_PAGE_ADDR(page, offset) ((page << 11) | offset << 5)
/* Page 0: Auxiliary data registers */
#define AIC26_REG_BAT1 AIC26_PAGE_ADDR(0, 0x05)