diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-10 18:55:24 -0500 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2013-01-15 01:42:17 -0500 |
commit | b17e54625cff1b06aec9df505b46c9bcdcd4823d (patch) | |
tree | 352673e11f5c5af0a40fe761eb947ae35c47820b | |
parent | cd74f7b3b387cbc6153b15c100982bac119af753 (diff) |
extcon: arizona: Allow configuration of MICBIAS rise time
Allow configuration of the rise time for MICBIAS via platform data, the
delay required depends on things like the external component selection.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 6 | ||||
-rw-r--r-- | include/linux/mfd/arizona/pdata.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 9e1d104803e7..635b7078ce5e 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c | |||
@@ -417,6 +417,12 @@ static int arizona_extcon_probe(struct platform_device *pdev) | |||
417 | } | 417 | } |
418 | } | 418 | } |
419 | 419 | ||
420 | if (arizona->pdata.micd_bias_start_time) | ||
421 | regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1, | ||
422 | ARIZONA_MICD_BIAS_STARTTIME_MASK, | ||
423 | arizona->pdata.micd_bias_start_time | ||
424 | << ARIZONA_MICD_BIAS_STARTTIME_SHIFT); | ||
425 | |||
420 | arizona_extcon_set_mode(info, 0); | 426 | arizona_extcon_set_mode(info, 0); |
421 | 427 | ||
422 | info->input = devm_input_allocate_device(&pdev->dev); | 428 | info->input = devm_input_allocate_device(&pdev->dev); |
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 8b1d1daaae16..5b0508853290 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h | |||
@@ -99,6 +99,9 @@ struct arizona_pdata { | |||
99 | /** GPIO for mic detection polarity */ | 99 | /** GPIO for mic detection polarity */ |
100 | int micd_pol_gpio; | 100 | int micd_pol_gpio; |
101 | 101 | ||
102 | /** Mic detect ramp rate */ | ||
103 | int micd_bias_start_time; | ||
104 | |||
102 | /** Headset polarity configurations */ | 105 | /** Headset polarity configurations */ |
103 | struct arizona_micd_config *micd_configs; | 106 | struct arizona_micd_config *micd_configs; |
104 | int num_micd_configs; | 107 | int num_micd_configs; |