aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-11 08:35:29 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2012-12-17 19:58:44 +0900
commit1ad9c8e168614ea22f32baab71af2d0fa8d3b769 (patch)
tree3e25e0529b6659f6dc28e620501206c3b6e9fa02
parentb28b048914bbdc0fd2442414d50db199b5522848 (diff)
downloadextcon-for-next.tar.gz
extcon: arizona: Allow configuration of MICBIAS rise timefor-next
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.c6
-rw-r--r--include/linux/mfd/arizona/pdata.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 67aecf8e96083..4e0a43f83ff8f 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -417,6 +417,12 @@ static int __devinit arizona_extcon_probe(struct platform_device *pdev)
}
}
+ if (arizona->pdata.micd_bias_start_time)
+ regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1,
+ ARIZONA_MICD_BIAS_STARTTIME_MASK,
+ arizona->pdata.micd_bias_start_time
+ << ARIZONA_MICD_BIAS_STARTTIME_SHIFT);
+
arizona_extcon_set_mode(info, 0);
info->input = input_allocate_device();
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h
index 7ab442905a57b..e8c785c7241bf 100644
--- a/include/linux/mfd/arizona/pdata.h
+++ b/include/linux/mfd/arizona/pdata.h
@@ -96,6 +96,9 @@ struct arizona_pdata {
/** GPIO for mic detection polarity */
int micd_pol_gpio;
+ /** Mic detect ramp rate */
+ int micd_bias_start_time;
+
/** Headset polarity configurations */
struct arizona_micd_config *micd_configs;
int num_micd_configs;