From 9e0ebc4073c9854b45a4ab9520ce4ce1f1e3bb31 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 21 Jan 2013 17:36:33 +0900 Subject: [PATCH] --- yaml --- r: 355072 b: refs/heads/master c: 2e033db5ddf299de2ae568919d78b0258a5a6423 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/extcon/extcon-arizona.c | 12 ++++++++++++ trunk/include/linux/mfd/arizona/pdata.h | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 04bc2c9876f2..e7cfcf1b03e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f9365d07dd5cb3c76b454b4c7827b2f6339cace2 +refs/heads/master: 2e033db5ddf299de2ae568919d78b0258a5a6423 diff --git a/trunk/drivers/extcon/extcon-arizona.c b/trunk/drivers/extcon/extcon-arizona.c index ab8b9c7359fb..d7e1047ad68e 100644 --- a/trunk/drivers/extcon/extcon-arizona.c +++ b/trunk/drivers/extcon/extcon-arizona.c @@ -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. diff --git a/trunk/include/linux/mfd/arizona/pdata.h b/trunk/include/linux/mfd/arizona/pdata.h index bcbe4fda87cb..2f5f08e10b79 100644 --- a/trunk/include/linux/mfd/arizona/pdata.h +++ b/trunk/include/linux/mfd/arizona/pdata.h @@ -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;