diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2015-09-16 11:42:17 +0200 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2015-09-22 08:27:58 +0200 |
commit | 6772a5ab4f53672adce6310dffe2b0c6987d8f92 (patch) | |
tree | 4d609a21c34d06b43b6eb2277f7e9ff9d097e815 /drivers/extcon | |
parent | extcon: arizona: Add support for new ADC value mic detect (diff) | |
download | linux-6772a5ab4f53672adce6310dffe2b0c6987d8f92.tar.xz linux-6772a5ab4f53672adce6310dffe2b0c6987d8f92.zip |
extcon: arizona: Add support for general purpose switch
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: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index f213e14ff93f..d719ee724651 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1310,6 +1310,10 @@ static int arizona_extcon_probe(struct platform_device *pdev) info->micd_num_modes = ARRAY_SIZE(micd_default_modes); } + if (arizona->pdata.gpsw > 0) + regmap_update_bits(arizona->regmap, ARIZONA_GP_SWITCH_1, + ARIZONA_SW1_MODE_MASK, arizona->pdata.gpsw); + if (arizona->pdata.micd_pol_gpio > 0) { if (info->micd_modes[0].gpio) mode = GPIOF_OUT_INIT_HIGH; |