summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2018-08-07 11:08:12 +0200
committerLee Jones <lee.jones@linaro.org>2018-08-16 11:14:05 +0200
commitd2c9281c184bf2b768ac141a7a10586e0643695d (patch)
tree6f74cd124ffc95adde5b5a55a13c239027a4f4fa
parentmfd: sm501: Set coherent_dma_mask when creating subdevices (diff)
downloadlinux-d2c9281c184bf2b768ac141a7a10586e0643695d.tar.xz
linux-d2c9281c184bf2b768ac141a7a10586e0643695d.zip
mfd: madera: Add register definitions for accessory detect
Add some register definitions for accessory detection, used by the extcon driver. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--include/linux/mfd/madera/registers.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/linux/mfd/madera/registers.h b/include/linux/mfd/madera/registers.h
index a6b7c4222c5e..977e06101711 100644
--- a/include/linux/mfd/madera/registers.h
+++ b/include/linux/mfd/madera/registers.h
@@ -1219,9 +1219,11 @@
#define MADERA_IRQ1_STATUS_33 0x1820
#define MADERA_IRQ1_MASK_1 0x1840
#define MADERA_IRQ1_MASK_2 0x1841
+#define MADERA_IRQ1_MASK_6 0x1845
#define MADERA_IRQ1_MASK_33 0x1860
#define MADERA_IRQ1_RAW_STATUS_1 0x1880
#define MADERA_IRQ1_RAW_STATUS_2 0x1881
+#define MADERA_IRQ1_RAW_STATUS_7 0x1886
#define MADERA_IRQ1_RAW_STATUS_15 0x188E
#define MADERA_IRQ1_RAW_STATUS_33 0x18A0
#define MADERA_INTERRUPT_DEBOUNCE_7 0x1A06
@@ -1664,6 +1666,42 @@
#define MADERA_MICB2A_ENA_SHIFT 0
#define MADERA_MICB2A_ENA_WIDTH 1
+/* (0x0225) - HP Ctrl 1L */
+#define MADERA_RMV_SHRT_HP1L 0x4000
+#define MADERA_RMV_SHRT_HP1L_MASK 0x4000
+#define MADERA_RMV_SHRT_HP1L_SHIFT 14
+#define MADERA_RMV_SHRT_HP1L_WIDTH 1
+#define MADERA_HP1L_FLWR 0x0004
+#define MADERA_HP1L_FLWR_MASK 0x0004
+#define MADERA_HP1L_FLWR_SHIFT 2
+#define MADERA_HP1L_FLWR_WIDTH 1
+#define MADERA_HP1L_SHRTI 0x0002
+#define MADERA_HP1L_SHRTI_MASK 0x0002
+#define MADERA_HP1L_SHRTI_SHIFT 1
+#define MADERA_HP1L_SHRTI_WIDTH 1
+#define MADERA_HP1L_SHRTO 0x0001
+#define MADERA_HP1L_SHRTO_MASK 0x0001
+#define MADERA_HP1L_SHRTO_SHIFT 0
+#define MADERA_HP1L_SHRTO_WIDTH 1
+
+/* (0x0226) - HP Ctrl 1R */
+#define MADERA_RMV_SHRT_HP1R 0x4000
+#define MADERA_RMV_SHRT_HP1R_MASK 0x4000
+#define MADERA_RMV_SHRT_HP1R_SHIFT 14
+#define MADERA_RMV_SHRT_HP1R_WIDTH 1
+#define MADERA_HP1R_FLWR 0x0004
+#define MADERA_HP1R_FLWR_MASK 0x0004
+#define MADERA_HP1R_FLWR_SHIFT 2
+#define MADERA_HP1R_FLWR_WIDTH 1
+#define MADERA_HP1R_SHRTI 0x0002
+#define MADERA_HP1R_SHRTI_MASK 0x0002
+#define MADERA_HP1R_SHRTI_SHIFT 1
+#define MADERA_HP1R_SHRTI_WIDTH 1
+#define MADERA_HP1R_SHRTO 0x0001
+#define MADERA_HP1R_SHRTO_MASK 0x0001
+#define MADERA_HP1R_SHRTO_SHIFT 0
+#define MADERA_HP1R_SHRTO_WIDTH 1
+
/* (0x0293) Accessory_Detect_Mode_1 */
#define MADERA_ACCDET_SRC 0x2000
#define MADERA_ACCDET_SRC_MASK 0x2000
@@ -3766,6 +3804,19 @@
#define MADERA_DSP1_BUS_ERR_EINT1_SHIFT 0
#define MADERA_DSP1_BUS_ERR_EINT1_WIDTH 1
+/* (0x1845) IRQ1_Mask_6 */
+#define MADERA_IM_MICDET2_EINT1 0x0200
+#define MADERA_IM_MICDET2_EINT1_MASK 0x0200
+#define MADERA_IM_MICDET2_EINT1_SHIFT 9
+#define MADERA_IM_MICDET2_EINT1_WIDTH 1
+#define MADERA_IM_MICDET1_EINT1 0x0100
+#define MADERA_IM_MICDET1_EINT1_MASK 0x0100
+#define MADERA_IM_MICDET1_EINT1_SHIFT 8
+#define MADERA_IM_MICDET1_EINT1_WIDTH 1
+#define MADERA_IM_HPDET_EINT1 0x0001
+#define MADERA_IM_HPDET_EINT1_MASK 0x0001
+#define MADERA_IM_HPDET_EINT1_SHIFT 0
+#define MADERA_IM_HPDET_EINT1_WIDTH 1
/* (0x184E) IRQ1_Mask_15 */
#define MADERA_IM_SPK_OVERHEAT_WARN_EINT1 0x0004
#define MADERA_IM_SPK_OVERHEAT_WARN_EINT1_MASK 0x0004