|
@@ -80,6 +80,7 @@
|
|
|
#define AB8500_ADSLOTSEL14 0x2C
|
|
|
#define AB8500_ADSLOTSEL15 0x2D
|
|
|
#define AB8500_ADSLOTSEL16 0x2E
|
|
|
+#define AB8500_ADSLOTSEL(slot) (AB8500_ADSLOTSEL1 + (slot >> 1))
|
|
|
#define AB8500_ADSLOTHIZCTRL1 0x2F
|
|
|
#define AB8500_ADSLOTHIZCTRL2 0x30
|
|
|
#define AB8500_ADSLOTHIZCTRL3 0x31
|
|
@@ -151,6 +152,7 @@
|
|
|
#define AB8500_CACHEREGNUM (AB8500_LAST_REG + 1)
|
|
|
|
|
|
#define AB8500_MASK_ALL 0xFF
|
|
|
+#define AB8500_MASK_SLOT(slot) ((slot & 1) ? 0xF0 : 0x0F)
|
|
|
#define AB8500_MASK_NONE 0x00
|
|
|
|
|
|
/* AB8500_POWERUP */
|
|
@@ -354,28 +356,21 @@
|
|
|
#define AB8500_DIGIFCONF4_IF1WL0 0
|
|
|
|
|
|
/* AB8500_ADSLOTSELX */
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT1_TO_SLOT_ODD 0x00
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT2_TO_SLOT_ODD 0x10
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT3_TO_SLOT_ODD 0x20
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT4_TO_SLOT_ODD 0x30
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT5_TO_SLOT_ODD 0x40
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT6_TO_SLOT_ODD 0x50
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT7_TO_SLOT_ODD 0x60
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT8_TO_SLOT_ODD 0x70
|
|
|
-#define AB8500_ADSLOTSELX_ZEROES_TO_SLOT_ODD 0x80
|
|
|
-#define AB8500_ADSLOTSELX_TRISTATE_TO_SLOT_ODD 0xF0
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT1_TO_SLOT_EVEN 0x00
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT2_TO_SLOT_EVEN 0x01
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT3_TO_SLOT_EVEN 0x02
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT4_TO_SLOT_EVEN 0x03
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT5_TO_SLOT_EVEN 0x04
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT6_TO_SLOT_EVEN 0x05
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT7_TO_SLOT_EVEN 0x06
|
|
|
-#define AB8500_ADSLOTSELX_AD_OUT8_TO_SLOT_EVEN 0x07
|
|
|
-#define AB8500_ADSLOTSELX_ZEROES_TO_SLOT_EVEN 0x08
|
|
|
-#define AB8500_ADSLOTSELX_TRISTATE_TO_SLOT_EVEN 0x0F
|
|
|
+#define AB8500_AD_OUT1 0x0
|
|
|
+#define AB8500_AD_OUT2 0x1
|
|
|
+#define AB8500_AD_OUT3 0x2
|
|
|
+#define AB8500_AD_OUT4 0x3
|
|
|
+#define AB8500_AD_OUT5 0x4
|
|
|
+#define AB8500_AD_OUT6 0x5
|
|
|
+#define AB8500_AD_OUT7 0x6
|
|
|
+#define AB8500_AD_OUT8 0x7
|
|
|
+#define AB8500_ZEROES 0x8
|
|
|
+#define AB8500_TRISTATE 0xF
|
|
|
#define AB8500_ADSLOTSELX_EVEN_SHIFT 0
|
|
|
#define AB8500_ADSLOTSELX_ODD_SHIFT 4
|
|
|
+#define AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(out, slot) \
|
|
|
+ ((out) << (((slot) & 1) ? \
|
|
|
+ AB8500_ADSLOTSELX_ODD_SHIFT : AB8500_ADSLOTSELX_EVEN_SHIFT))
|
|
|
|
|
|
/* AB8500_ADSLOTHIZCTRL1 */
|
|
|
/* AB8500_ADSLOTHIZCTRL2 */
|