aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-max77693.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/extcon/extcon-max77693.c')
-rw-r--r--drivers/extcon/extcon-max77693.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index af165fd0c6f5..a66bec8f6252 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -190,8 +190,8 @@ enum max77693_muic_acc_type {
190 /* The below accessories have same ADC value so ADCLow and 190 /* The below accessories have same ADC value so ADCLow and
191 ADC1K bit is used to separate specific accessory */ 191 ADC1K bit is used to separate specific accessory */
192 /* ADC|VBVolot|ADCLow|ADC1K| */ 192 /* ADC|VBVolot|ADCLow|ADC1K| */
193 MAX77693_MUIC_GND_USB_OTG = 0x100, /* 0x0| 0| 0| 0| */ 193 MAX77693_MUIC_GND_USB_HOST = 0x100, /* 0x0| 0| 0| 0| */
194 MAX77693_MUIC_GND_USB_OTG_VB = 0x104, /* 0x0| 1| 0| 0| */ 194 MAX77693_MUIC_GND_USB_HOST_VB = 0x104, /* 0x0| 1| 0| 0| */
195 MAX77693_MUIC_GND_AV_CABLE_LOAD = 0x102,/* 0x0| 0| 1| 0| */ 195 MAX77693_MUIC_GND_AV_CABLE_LOAD = 0x102,/* 0x0| 0| 1| 0| */
196 MAX77693_MUIC_GND_MHL = 0x103, /* 0x0| 0| 1| 1| */ 196 MAX77693_MUIC_GND_MHL = 0x103, /* 0x0| 0| 1| 1| */
197 MAX77693_MUIC_GND_MHL_VB = 0x107, /* 0x0| 1| 1| 1| */ 197 MAX77693_MUIC_GND_MHL_VB = 0x107, /* 0x0| 1| 1| 1| */
@@ -228,7 +228,7 @@ static const char *max77693_extcon_cable[] = {
228 [EXTCON_CABLE_SLOW_CHARGER] = "Slow-charger", 228 [EXTCON_CABLE_SLOW_CHARGER] = "Slow-charger",
229 [EXTCON_CABLE_CHARGE_DOWNSTREAM] = "Charge-downstream", 229 [EXTCON_CABLE_CHARGE_DOWNSTREAM] = "Charge-downstream",
230 [EXTCON_CABLE_MHL] = "MHL", 230 [EXTCON_CABLE_MHL] = "MHL",
231 [EXTCON_CABLE_MHL_TA] = "MHL_TA", 231 [EXTCON_CABLE_MHL_TA] = "MHL-TA",
232 [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON", 232 [EXTCON_CABLE_JIG_USB_ON] = "JIG-USB-ON",
233 [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF", 233 [EXTCON_CABLE_JIG_USB_OFF] = "JIG-USB-OFF",
234 [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF", 234 [EXTCON_CABLE_JIG_UART_OFF] = "JIG-UART-OFF",
@@ -403,8 +403,8 @@ static int max77693_muic_get_cable_type(struct max77693_muic_info *info,
403 403
404 /** 404 /**
405 * [0x1|VBVolt|ADCLow|ADC1K] 405 * [0x1|VBVolt|ADCLow|ADC1K]
406 * [0x1| 0| 0| 0] USB_OTG 406 * [0x1| 0| 0| 0] USB_HOST
407 * [0x1| 1| 0| 0] USB_OTG_VB 407 * [0x1| 1| 0| 0] USB_HSOT_VB
408 * [0x1| 0| 1| 0] Audio Video cable with load 408 * [0x1| 0| 1| 0] Audio Video cable with load
409 * [0x1| 0| 1| 1] MHL without charging cable 409 * [0x1| 0| 1| 1] MHL without charging cable
410 * [0x1| 1| 1| 1] MHL with charging cable 410 * [0x1| 1| 1| 1] MHL with charging cable
@@ -523,7 +523,7 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info,
523 * - Support charging and data connection through micro-usb port 523 * - Support charging and data connection through micro-usb port
524 * if USB cable is connected between target and host 524 * if USB cable is connected between target and host
525 * device. 525 * device.
526 * - Support OTG device (Mouse/Keyboard) 526 * - Support OTG(On-The-Go) device (Ex: Mouse/Keyboard)
527 */ 527 */
528 ret = max77693_muic_set_path(info, info->path_usb, attached); 528 ret = max77693_muic_set_path(info, info->path_usb, attached);
529 if (ret < 0) 529 if (ret < 0)
@@ -609,9 +609,9 @@ static int max77693_muic_adc_ground_handler(struct max77693_muic_info *info)
609 MAX77693_CABLE_GROUP_ADC_GND, &attached); 609 MAX77693_CABLE_GROUP_ADC_GND, &attached);
610 610
611 switch (cable_type_gnd) { 611 switch (cable_type_gnd) {
612 case MAX77693_MUIC_GND_USB_OTG: 612 case MAX77693_MUIC_GND_USB_HOST:
613 case MAX77693_MUIC_GND_USB_OTG_VB: 613 case MAX77693_MUIC_GND_USB_HOST_VB:
614 /* USB_OTG, PATH: AP_USB */ 614 /* USB_HOST, PATH: AP_USB */
615 ret = max77693_muic_set_path(info, CONTROL1_SW_USB, attached); 615 ret = max77693_muic_set_path(info, CONTROL1_SW_USB, attached);
616 if (ret < 0) 616 if (ret < 0)
617 return ret; 617 return ret;
@@ -704,7 +704,7 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info)
704 704
705 switch (cable_type) { 705 switch (cable_type) {
706 case MAX77693_MUIC_ADC_GROUND: 706 case MAX77693_MUIC_ADC_GROUND:
707 /* USB_OTG/MHL/Audio */ 707 /* USB_HOST/MHL/Audio */
708 max77693_muic_adc_ground_handler(info); 708 max77693_muic_adc_ground_handler(info);
709 break; 709 break;
710 case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF: 710 case MAX77693_MUIC_ADC_FACTORY_MODE_USB_OFF:
@@ -823,19 +823,19 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
823 case MAX77693_MUIC_GND_MHL: 823 case MAX77693_MUIC_GND_MHL:
824 case MAX77693_MUIC_GND_MHL_VB: 824 case MAX77693_MUIC_GND_MHL_VB:
825 /* 825 /*
826 * MHL cable with MHL_TA(USB/TA) cable 826 * MHL cable with MHL-TA(USB/TA) cable
827 * - MHL cable include two port(HDMI line and separate 827 * - MHL cable include two port(HDMI line and separate
828 * micro-usb port. When the target connect MHL cable, 828 * micro-usb port. When the target connect MHL cable,
829 * extcon driver check whether MHL_TA(USB/TA) cable is 829 * extcon driver check whether MHL-TA(USB/TA) cable is
830 * connected. If MHL_TA cable is connected, extcon 830 * connected. If MHL-TA cable is connected, extcon
831 * driver notify state to notifiee for charging battery. 831 * driver notify state to notifiee for charging battery.
832 * 832 *
833 * Features of 'MHL_TA(USB/TA) with MHL cable' 833 * Features of 'MHL-TA(USB/TA) with MHL cable'
834 * - Support MHL 834 * - Support MHL
835 * - Support charging through micro-usb port without 835 * - Support charging through micro-usb port without
836 * data connection 836 * data connection
837 */ 837 */
838 extcon_set_cable_state(info->edev, "MHL_TA", attached); 838 extcon_set_cable_state(info->edev, "MHL-TA", attached);
839 if (!cable_attached) 839 if (!cable_attached)
840 extcon_set_cable_state(info->edev, 840 extcon_set_cable_state(info->edev,
841 "MHL", cable_attached); 841 "MHL", cable_attached);
@@ -886,7 +886,7 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
886 * - Support charging and data connection through micro- 886 * - Support charging and data connection through micro-
887 * usb port if USB cable is connected between target 887 * usb port if USB cable is connected between target
888 * and host device 888 * and host device
889 * - Support OTG device (Mouse/Keyboard) 889 * - Support OTG(On-The-Go) device (Ex: Mouse/Keyboard)
890 */ 890 */
891 ret = max77693_muic_set_path(info, info->path_usb, 891 ret = max77693_muic_set_path(info, info->path_usb,
892 attached); 892 attached);
@@ -1019,8 +1019,6 @@ static void max77693_muic_irq_work(struct work_struct *work)
1019 dev_err(info->dev, "failed to handle MUIC interrupt\n"); 1019 dev_err(info->dev, "failed to handle MUIC interrupt\n");
1020 1020
1021 mutex_unlock(&info->mutex); 1021 mutex_unlock(&info->mutex);
1022
1023 return;
1024} 1022}
1025 1023
1026static irqreturn_t max77693_muic_irq_handler(int irq, void *data) 1024static irqreturn_t max77693_muic_irq_handler(int irq, void *data)
@@ -1171,8 +1169,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
1171 muic_irq->name, info); 1169 muic_irq->name, info);
1172 if (ret) { 1170 if (ret) {
1173 dev_err(&pdev->dev, 1171 dev_err(&pdev->dev,
1174 "failed: irq request (IRQ: %d," 1172 "failed: irq request (IRQ: %d, error :%d)\n",
1175 " error :%d)\n",
1176 muic_irq->irq, ret); 1173 muic_irq->irq, ret);
1177 return ret; 1174 return ret;
1178 } 1175 }