aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-max77693.c
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2015-11-08 20:10:15 -0500
committerChanwoo Choi <cw00.choi@samsung.com>2016-01-24 23:16:53 -0500
commit8b45b6a0741678902810d7be95e635c210fbb198 (patch)
treed79afeed652c392dee1464cc57eadba3c39d8bd7 /drivers/extcon/extcon-max77693.c
parentb51b387020ee1c2bc27bf9121ca9b9d4113e433d (diff)
extcon: Add the EXTCON_CHG_USB_SDP to support SDP charing port
This patch adds the new EXTCON_CHG_USB_SDP connector to support SDP (Standard Downstream Port) USB charging port. The commit 11eecf910bd8 ("extcon: Modify the id and name of external connector") add the new EXTCON_CHG_USB_SDP connector which support the both data transfer and usb charging at the same time. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-max77693.c')
-rw-r--r--drivers/extcon/extcon-max77693.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index fdf8f5d4d4e9..f17cb76b567c 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -204,6 +204,7 @@ enum max77693_muic_acc_type {
204static const unsigned int max77693_extcon_cable[] = { 204static const unsigned int max77693_extcon_cable[] = {
205 EXTCON_USB, 205 EXTCON_USB,
206 EXTCON_USB_HOST, 206 EXTCON_USB_HOST,
207 EXTCON_CHG_USB_SDP,
207 EXTCON_CHG_USB_DCP, 208 EXTCON_CHG_USB_DCP,
208 EXTCON_CHG_USB_FAST, 209 EXTCON_CHG_USB_FAST,
209 EXTCON_CHG_USB_SLOW, 210 EXTCON_CHG_USB_SLOW,
@@ -512,8 +513,11 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info,
512 break; 513 break;
513 case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ 514 case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */
514 dock_id = EXTCON_DOCK; 515 dock_id = EXTCON_DOCK;
515 if (!attached) 516 if (!attached) {
516 extcon_set_cable_state_(info->edev, EXTCON_USB, false); 517 extcon_set_cable_state_(info->edev, EXTCON_USB, false);
518 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_SDP,
519 false);
520 }
517 break; 521 break;
518 default: 522 default:
519 dev_err(info->dev, "failed to detect %s dock device\n", 523 dev_err(info->dev, "failed to detect %s dock device\n",
@@ -601,6 +605,8 @@ static int max77693_muic_adc_ground_handler(struct max77693_muic_info *info)
601 if (ret < 0) 605 if (ret < 0)
602 return ret; 606 return ret;
603 extcon_set_cable_state_(info->edev, EXTCON_USB, attached); 607 extcon_set_cable_state_(info->edev, EXTCON_USB, attached);
608 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_SDP,
609 attached);
604 break; 610 break;
605 case MAX77693_MUIC_GND_MHL: 611 case MAX77693_MUIC_GND_MHL:
606 case MAX77693_MUIC_GND_MHL_VB: 612 case MAX77693_MUIC_GND_MHL_VB:
@@ -830,6 +836,8 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
830 */ 836 */
831 extcon_set_cable_state_(info->edev, EXTCON_USB, 837 extcon_set_cable_state_(info->edev, EXTCON_USB,
832 attached); 838 attached);
839 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_SDP,
840 attached);
833 841
834 if (!cable_attached) 842 if (!cable_attached)
835 extcon_set_cable_state_(info->edev, EXTCON_DOCK, 843 extcon_set_cable_state_(info->edev, EXTCON_DOCK,
@@ -899,6 +907,8 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
899 907
900 extcon_set_cable_state_(info->edev, EXTCON_USB, 908 extcon_set_cable_state_(info->edev, EXTCON_USB,
901 attached); 909 attached);
910 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_SDP,
911 attached);
902 break; 912 break;
903 case MAX77693_CHARGER_TYPE_DEDICATED_CHG: 913 case MAX77693_CHARGER_TYPE_DEDICATED_CHG:
904 /* Only TA cable */ 914 /* Only TA cable */