mfd: arizona: Document HP_CTRL_1L and HP_CTRL_1R registers
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 4 Nov 2014 15:24:36 +0000 (15:24 +0000)
committerLee Jones <lee.jones@linaro.org>
Tue, 25 Nov 2014 16:18:55 +0000 (16:18 +0000)
These registers are documented in the datasheet and used as part of the
extcon driver. Expose them properly through regmap as the datasheet
notes they should be treated as volatile do so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
drivers/mfd/wm5102-tables.c
drivers/mfd/wm5110-tables.c
drivers/mfd/wm8997-tables.c
include/linux/mfd/arizona/registers.h

index d6f35bbf795b43f75660878532cdd3dbd368cf99..b326a82017ee7f35dfeb0ab3355dda3854c0fc39 100644 (file)
@@ -336,8 +336,6 @@ static const struct reg_default wm5102_reg_default[] = {
        { 0x00000218, 0x01A6 },   /* R536   - Mic Bias Ctrl 1 */ 
        { 0x00000219, 0x01A6 },   /* R537   - Mic Bias Ctrl 2 */ 
        { 0x0000021A, 0x01A6 },   /* R538   - Mic Bias Ctrl 3 */ 
-       { 0x00000225, 0x0400 },   /* R549   - HP Ctrl 1L */
-       { 0x00000226, 0x0400 },   /* R550   - HP Ctrl 1R */
        { 0x00000293, 0x0000 },   /* R659   - Accessory Detect Mode 1 */ 
        { 0x0000029B, 0x0020 },   /* R667   - Headphone Detect 1 */ 
        { 0x0000029C, 0x0000 },   /* R668   - Headphone Detect 2 */
@@ -1112,6 +1110,8 @@ static bool wm5102_readable_register(struct device *dev, unsigned int reg)
        case ARIZONA_MIC_BIAS_CTRL_1:
        case ARIZONA_MIC_BIAS_CTRL_2:
        case ARIZONA_MIC_BIAS_CTRL_3:
+       case ARIZONA_HP_CTRL_1L:
+       case ARIZONA_HP_CTRL_1R:
        case ARIZONA_ACCESSORY_DETECT_MODE_1:
        case ARIZONA_HEADPHONE_DETECT_1:
        case ARIZONA_HEADPHONE_DETECT_2:
@@ -1949,6 +1949,8 @@ static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
        case ARIZONA_DSP1_SCRATCH_1:
        case ARIZONA_DSP1_SCRATCH_2:
        case ARIZONA_DSP1_SCRATCH_3:
+       case ARIZONA_HP_CTRL_1L:
+       case ARIZONA_HP_CTRL_1R:
        case ARIZONA_HEADPHONE_DETECT_2:
        case ARIZONA_HP_DACVAL:
        case ARIZONA_MIC_DETECT_3:
index 4642b5b816a043e723e61373703839bc9d90b7c2..c75390ad4f4517c6f9dadb1c39e873c6c9be6628 100644 (file)
@@ -1790,6 +1790,8 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
        case ARIZONA_MIC_BIAS_CTRL_1:
        case ARIZONA_MIC_BIAS_CTRL_2:
        case ARIZONA_MIC_BIAS_CTRL_3:
+       case ARIZONA_HP_CTRL_1L:
+       case ARIZONA_HP_CTRL_1R:
        case ARIZONA_ACCESSORY_DETECT_MODE_1:
        case ARIZONA_HEADPHONE_DETECT_1:
        case ARIZONA_HEADPHONE_DETECT_2:
@@ -2825,6 +2827,8 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg)
        case ARIZONA_ASYNC_SAMPLE_RATE_1_STATUS:
        case ARIZONA_ASYNC_SAMPLE_RATE_2_STATUS:
        case ARIZONA_MIC_DETECT_3:
+       case ARIZONA_HP_CTRL_1L:
+       case ARIZONA_HP_CTRL_1R:
        case ARIZONA_HEADPHONE_DETECT_2:
        case ARIZONA_INPUT_ENABLES_STATUS:
        case ARIZONA_OUTPUT_STATUS_1:
index f44d195d44964ac4306c551613c94d40ec62bc11..c0c25d75aaccbf3a53218b71d5ea18f0b24c9d0d 100644 (file)
@@ -887,6 +887,8 @@ static bool wm8997_readable_register(struct device *dev, unsigned int reg)
        case ARIZONA_MIC_BIAS_CTRL_1:
        case ARIZONA_MIC_BIAS_CTRL_2:
        case ARIZONA_MIC_BIAS_CTRL_3:
+       case ARIZONA_HP_CTRL_1L:
+       case ARIZONA_HP_CTRL_1R:
        case ARIZONA_ACCESSORY_DETECT_MODE_1:
        case ARIZONA_HEADPHONE_DETECT_1:
        case ARIZONA_HEADPHONE_DETECT_2:
@@ -1479,6 +1481,8 @@ static bool wm8997_volatile_register(struct device *dev, unsigned int reg)
        case ARIZONA_SAMPLE_RATE_3_STATUS:
        case ARIZONA_ASYNC_SAMPLE_RATE_1_STATUS:
        case ARIZONA_MIC_DETECT_3:
+       case ARIZONA_HP_CTRL_1L:
+       case ARIZONA_HP_CTRL_1R:
        case ARIZONA_HEADPHONE_DETECT_2:
        case ARIZONA_INPUT_ENABLES_STATUS:
        case ARIZONA_OUTPUT_STATUS_1:
index c0b075f6bc35e8b1b0fd51b347ca8b18e70b6eea..d521f327b34f876263c915d46351a953863c3dfe 100644 (file)
 #define ARIZONA_MIC_BIAS_CTRL_1                  0x218
 #define ARIZONA_MIC_BIAS_CTRL_2                  0x219
 #define ARIZONA_MIC_BIAS_CTRL_3                  0x21A
+#define ARIZONA_HP_CTRL_1L                       0x225
+#define ARIZONA_HP_CTRL_1R                       0x226
 #define ARIZONA_ACCESSORY_DETECT_MODE_1          0x293
 #define ARIZONA_HEADPHONE_DETECT_1               0x29B
 #define ARIZONA_HEADPHONE_DETECT_2               0x29C
 #define ARIZONA_MICB3_ENA_SHIFT                       0  /* MICB3_ENA */
 #define ARIZONA_MICB3_ENA_WIDTH                       1  /* MICB3_ENA */
 
+/*
+ * R549 (0x225) - HP Ctrl 1L
+ */
+#define ARIZONA_RMV_SHRT_HP1L                    0x4000  /* RMV_SHRT_HP1L */
+#define ARIZONA_RMV_SHRT_HP1L_MASK               0x4000  /* RMV_SHRT_HP1L */
+#define ARIZONA_RMV_SHRT_HP1L_SHIFT                  14  /* RMV_SHRT_HP1L */
+#define ARIZONA_RMV_SHRT_HP1L_WIDTH                   1  /* RMV_SHRT_HP1L */
+#define ARIZONA_HP1L_FLWR                        0x0004  /* HP1L_FLWR */
+#define ARIZONA_HP1L_FLWR_MASK                   0x0004  /* HP1L_FLWR */
+#define ARIZONA_HP1L_FLWR_SHIFT                       2  /* HP1L_FLWR */
+#define ARIZONA_HP1L_FLWR_WIDTH                       1  /* HP1L_FLWR */
+#define ARIZONA_HP1L_SHRTI                       0x0002  /* HP1L_SHRTI */
+#define ARIZONA_HP1L_SHRTI_MASK                  0x0002  /* HP1L_SHRTI */
+#define ARIZONA_HP1L_SHRTI_SHIFT                      1  /* HP1L_SHRTI */
+#define ARIZONA_HP1L_SHRTI_WIDTH                      1  /* HP1L_SHRTI */
+#define ARIZONA_HP1L_SHRTO                       0x0001  /* HP1L_SHRTO */
+#define ARIZONA_HP1L_SHRTO_MASK                  0x0001  /* HP1L_SHRTO */
+#define ARIZONA_HP1L_SHRTO_SHIFT                      0  /* HP1L_SHRTO */
+#define ARIZONA_HP1L_SHRTO_WIDTH                      1  /* HP1L_SHRTO */
+
+/*
+ * R550 (0x226) - HP Ctrl 1R
+ */
+#define ARIZONA_RMV_SHRT_HP1R                    0x4000  /* RMV_SHRT_HP1R */
+#define ARIZONA_RMV_SHRT_HP1R_MASK               0x4000  /* RMV_SHRT_HP1R */
+#define ARIZONA_RMV_SHRT_HP1R_SHIFT                  14  /* RMV_SHRT_HP1R */
+#define ARIZONA_RMV_SHRT_HP1R_WIDTH                   1  /* RMV_SHRT_HP1R */
+#define ARIZONA_HP1R_FLWR                        0x0004  /* HP1R_FLWR */
+#define ARIZONA_HP1R_FLWR_MASK                   0x0004  /* HP1R_FLWR */
+#define ARIZONA_HP1R_FLWR_SHIFT                       2  /* HP1R_FLWR */
+#define ARIZONA_HP1R_FLWR_WIDTH                       1  /* HP1R_FLWR */
+#define ARIZONA_HP1R_SHRTI                       0x0002  /* HP1R_SHRTI */
+#define ARIZONA_HP1R_SHRTI_MASK                  0x0002  /* HP1R_SHRTI */
+#define ARIZONA_HP1R_SHRTI_SHIFT                      1  /* HP1R_SHRTI */
+#define ARIZONA_HP1R_SHRTI_WIDTH                      1  /* HP1R_SHRTI */
+#define ARIZONA_HP1R_SHRTO                       0x0001  /* HP1R_SHRTO */
+#define ARIZONA_HP1R_SHRTO_MASK                  0x0001  /* HP1R_SHRTO */
+#define ARIZONA_HP1R_SHRTO_SHIFT                      0  /* HP1R_SHRTO */
+#define ARIZONA_HP1R_SHRTO_WIDTH                      1  /* HP1R_SHRTO */
+
 /*
  * R659 (0x293) - Accessory Detect Mode 1
  */