mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
extcon: arizona: Use extcon cable API with index of extcon cable instead of string
Use extcon cable API instead of state API as it is much more idiomatic. Signed-off-by: Nikesh Oswal <[email protected]> Signed-off-by: Charles Keepax <[email protected]> [Modify patch title by Chanwoo Choi] Signed-off-by: Chanwoo Choi <[email protected]>
This commit is contained in:
parent
5a8844b596
commit
34602486d0
1 changed files with 6 additions and 9 deletions
|
|
@ -669,9 +669,8 @@ err:
|
|||
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
|
||||
|
||||
/* Just report headphone */
|
||||
ret = extcon_update_state(info->edev,
|
||||
1 << ARIZONA_CABLE_HEADPHONE,
|
||||
1 << ARIZONA_CABLE_HEADPHONE);
|
||||
ret = extcon_set_cable_state_(info->edev,
|
||||
ARIZONA_CABLE_HEADPHONE, true);
|
||||
if (ret != 0)
|
||||
dev_err(arizona->dev, "Failed to report headphone: %d\n", ret);
|
||||
|
||||
|
|
@ -728,9 +727,8 @@ err:
|
|||
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
|
||||
|
||||
/* Just report headphone */
|
||||
ret = extcon_update_state(info->edev,
|
||||
1 << ARIZONA_CABLE_HEADPHONE,
|
||||
1 << ARIZONA_CABLE_HEADPHONE);
|
||||
ret = extcon_set_cable_state_(info->edev,
|
||||
ARIZONA_CABLE_HEADPHONE, true);
|
||||
if (ret != 0)
|
||||
dev_err(arizona->dev, "Failed to report headphone: %d\n", ret);
|
||||
|
||||
|
|
@ -817,9 +815,8 @@ static void arizona_micd_detect(struct work_struct *work)
|
|||
if (info->detecting && (val & ARIZONA_MICD_LVL_8)) {
|
||||
arizona_identify_headphone(info);
|
||||
|
||||
ret = extcon_update_state(info->edev,
|
||||
1 << ARIZONA_CABLE_MICROPHONE,
|
||||
1 << ARIZONA_CABLE_MICROPHONE);
|
||||
ret = extcon_set_cable_state_(info->edev,
|
||||
ARIZONA_CABLE_MICROPHONE, true);
|
||||
|
||||
if (ret != 0)
|
||||
dev_err(arizona->dev, "Headset report failed: %d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue