]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mfd: madera: Add register definitions for accessory detect
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 7 Aug 2018 09:08:12 +0000 (10:08 +0100)
committerLee Jones <lee.jones@linaro.org>
Thu, 16 Aug 2018 09:14:05 +0000 (10:14 +0100)
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>
include/linux/mfd/madera/registers.h

index a6b7c4222c5eb2960b27317d35b83cc2f915a861..977e061017117f88045f8e72a08c4fcc772a375d 100644 (file)
 #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
 #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
 #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