Skip to content

Commit

Permalink
extcon: arizona: Allow configuration of MICBIAS rise time
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown authored and Chanwoo Choi committed Jan 15, 2013
1 parent cd74f7b commit b17e546
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,12 @@ static int 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 = devm_input_allocate_device(&pdev->dev);
Expand Down
3 changes: 3 additions & 0 deletions include/linux/mfd/arizona/pdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,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;
Expand Down

0 comments on commit b17e546

Please sign in to comment.