Skip to content

Commit

Permalink
extcon: arizona: Use the micd_clamp for interrupts if it is available
Browse files Browse the repository at this point in the history
Currently we only use the microphone clamp IRQ if GPIO5 is being used as
a second jack detection pin. But we should be using it on any system
where the clamp is available. This patch updates the driver to do so.

Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
  • Loading branch information
charleskeepax authored and chanwoochoi committed Sep 22, 2015
1 parent a0ef642 commit ff1cb0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ static irqreturn_t arizona_jackdet(int irq, void *data)

mutex_lock(&info->lock);

if (arizona->pdata.jd_gpio5) {
if (info->micd_clamp) {
mask = ARIZONA_MICD_CLAMP_STS;
present = 0;
} else {
Expand Down Expand Up @@ -1504,7 +1504,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
pm_runtime_idle(&pdev->dev);
pm_runtime_get_sync(&pdev->dev);

if (arizona->pdata.jd_gpio5) {
if (info->micd_clamp) {
jack_irq_rise = ARIZONA_IRQ_MICD_CLAMP_RISE;
jack_irq_fall = ARIZONA_IRQ_MICD_CLAMP_FALL;
} else {
Expand Down Expand Up @@ -1609,7 +1609,7 @@ static int arizona_extcon_remove(struct platform_device *pdev)
ARIZONA_MICD_CLAMP_CONTROL,
ARIZONA_MICD_CLAMP_MODE_MASK, 0);

if (arizona->pdata.jd_gpio5) {
if (info->micd_clamp) {
jack_irq_rise = ARIZONA_IRQ_MICD_CLAMP_RISE;
jack_irq_fall = ARIZONA_IRQ_MICD_CLAMP_FALL;
} else {
Expand Down

0 comments on commit ff1cb0e

Please sign in to comment.