mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 12:16:45 +07:00
extcon: arizona: Support additional configuration of microphone detection
Allow systems to tune detection rate and debounce suitably for their mechanical parameters. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
f9365d07dd
commit
2e033db5dd
@ -907,6 +907,18 @@ static int arizona_extcon_probe(struct platform_device *pdev)
|
||||
arizona->pdata.micd_bias_start_time
|
||||
<< ARIZONA_MICD_BIAS_STARTTIME_SHIFT);
|
||||
|
||||
if (arizona->pdata.micd_rate)
|
||||
regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1,
|
||||
ARIZONA_MICD_RATE_MASK,
|
||||
arizona->pdata.micd_rate
|
||||
<< ARIZONA_MICD_RATE_SHIFT);
|
||||
|
||||
if (arizona->pdata.micd_dbtime)
|
||||
regmap_update_bits(arizona->regmap, ARIZONA_MIC_DETECT_1,
|
||||
ARIZONA_MICD_DBTIME_MASK,
|
||||
arizona->pdata.micd_dbtime
|
||||
<< ARIZONA_MICD_DBTIME_SHIFT);
|
||||
|
||||
/*
|
||||
* If we have a clamp use it, activating in conjunction with
|
||||
* GPIO5 if that is connected for jack detect operation.
|
||||
|
@ -111,6 +111,12 @@ struct arizona_pdata {
|
||||
/** Mic detect ramp rate */
|
||||
int micd_bias_start_time;
|
||||
|
||||
/** Mic detect sample rate */
|
||||
int micd_rate;
|
||||
|
||||
/** Mic detect debounce level */
|
||||
int micd_dbtime;
|
||||
|
||||
/** Headset polarity configurations */
|
||||
struct arizona_micd_config *micd_configs;
|
||||
int num_micd_configs;
|
||||
|
Loading…
Reference in New Issue
Block a user