Skip to content

Commit f4ba6c0

Browse files
charleskeepaxchanwoochoi
authored andcommitted
extcon: arizona: Remove unnecessary sets of ACCDET_MODE
arizona_start_mic sets ACCDET_MODE as required for the microphone detection as such it is redundant to set this outside of this function. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent d5aa46d commit f4ba6c0

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

drivers/extcon/extcon-arizona.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,6 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
668668
if (id_gpio)
669669
gpio_set_value_cansleep(id_gpio, 0);
670670

671-
/* Revert back to MICDET mode */
672-
regmap_update_bits(arizona->regmap,
673-
ARIZONA_ACCESSORY_DETECT_MODE_1,
674-
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
675-
676671
/* If we have a mic then reenable MICDET */
677672
if (mic || info->mic)
678673
arizona_start_mic(info);
@@ -732,9 +727,6 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info)
732727
arizona_extcon_hp_clamp(info, false);
733728
pm_runtime_put_autosuspend(info->dev);
734729

735-
regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1,
736-
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
737-
738730
/* Just report headphone */
739731
ret = extcon_set_state_sync(info->edev, EXTCON_JACK_HEADPHONE, true);
740732
if (ret != 0)
@@ -789,9 +781,6 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info)
789781
return;
790782

791783
err:
792-
regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1,
793-
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
794-
795784
/* Just report headphone */
796785
ret = extcon_set_state_sync(info->edev, EXTCON_JACK_HEADPHONE, true);
797786
if (ret != 0)

0 commit comments

Comments
 (0)