mfd: arizona: Add register bits for general purpose switch
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Wed, 16 Sep 2015 09:42:14 +0000 (10:42 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 22 Sep 2015 06:23:59 +0000 (15:23 +0900)
The switch is typically used in conjunction with the MICDET clamp in
order to suppress pops and clicks associated with jack insertion.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/mfd/wm5110-tables.c
include/linux/mfd/arizona/pdata.h

index 5f604e00aaf1acb5ac3b6a55315cfa36216364d4..aae17d6997b1f71380a2a4e504ca4696d7c1fef6 100644 (file)
@@ -1481,6 +1481,7 @@ static const struct reg_default wm5110_reg_default[] = {
        { 0x00000C04, 0xA101 },    /* R3076  - GPIO5 CTRL */
        { 0x00000C0F, 0x0400 },    /* R3087  - IRQ CTRL 1 */
        { 0x00000C10, 0x1000 },    /* R3088  - GPIO Debounce Config */
+       { 0x00000C18, 0x0000 },    /* R3096  - GP Switch 1 */
        { 0x00000C20, 0x8002 },    /* R3104  - Misc Pad Ctrl 1 */
        { 0x00000C21, 0x8001 },    /* R3105  - Misc Pad Ctrl 2 */
        { 0x00000C22, 0x0000 },    /* R3106  - Misc Pad Ctrl 3 */
@@ -2528,6 +2529,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
        case ARIZONA_GPIO5_CTRL:
        case ARIZONA_IRQ_CTRL_1:
        case ARIZONA_GPIO_DEBOUNCE_CONFIG:
+       case ARIZONA_GP_SWITCH_1:
        case ARIZONA_MISC_PAD_CTRL_1:
        case ARIZONA_MISC_PAD_CTRL_2:
        case ARIZONA_MISC_PAD_CTRL_3:
index 92f31ffaf8667ab598fc5bc7dde036a5bd69d066..57b45caaea80fe2fb5ca4a20ce2748030b69c0d4 100644 (file)
@@ -184,6 +184,9 @@ struct arizona_pdata {
 
        /** GPIO for primary IRQ (used for edge triggered emulation) */
        int irq_gpio;
+
+       /** General purpose switch control */
+       unsigned int gpsw;
 };
 
 #endif