aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-max8997.c
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2016-08-16 02:55:34 -0400
committerChanwoo Choi <cw00.choi@samsung.com>2016-09-12 22:26:26 -0400
commit8670b4598064007abfc44554e713fa2004734e1d (patch)
tree0dbe828dfa26bdd689c83b91735a756a2b484609 /drivers/extcon/extcon-max8997.c
parent525867dbd11899835a029da3532eeee9f773db31 (diff)
extcon: Use the extcon_set_state_sync() instead of deprecated functions
This patch alters the renamed extcon API to set the state of the external connectors instead of deprecated extcon_set_cable_state_(). Because the patch[1] modifies the function name to maintain the function naming pattern. - extcon_set_cable_state_() -> extcon_set_state_sync() - extcon_get_cable_state_() -> extcon_get_state() [1] https://lkml.org/lkml/2016/8/4/729 - extcon: Rename the extcon_set/get_state() to maintain the function naming pattern Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Roger Quadros <rogerq@ti.com>
Diffstat (limited to 'drivers/extcon/extcon-max8997.c')
-rw-r--r--drivers/extcon/extcon-max8997.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 9a89320d09a8..4a0612fb9c07 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -331,11 +331,11 @@ static int max8997_muic_handle_usb(struct max8997_muic_info *info,
331 331
332 switch (usb_type) { 332 switch (usb_type) {
333 case MAX8997_USB_HOST: 333 case MAX8997_USB_HOST:
334 extcon_set_cable_state_(info->edev, EXTCON_USB_HOST, attached); 334 extcon_set_state_sync(info->edev, EXTCON_USB_HOST, attached);
335 break; 335 break;
336 case MAX8997_USB_DEVICE: 336 case MAX8997_USB_DEVICE:
337 extcon_set_cable_state_(info->edev, EXTCON_USB, attached); 337 extcon_set_state_sync(info->edev, EXTCON_USB, attached);
338 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_SDP, 338 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_SDP,
339 attached); 339 attached);
340 break; 340 break;
341 default: 341 default:
@@ -361,7 +361,7 @@ static int max8997_muic_handle_dock(struct max8997_muic_info *info,
361 switch (cable_type) { 361 switch (cable_type) {
362 case MAX8997_MUIC_ADC_AV_CABLE_NOLOAD: 362 case MAX8997_MUIC_ADC_AV_CABLE_NOLOAD:
363 case MAX8997_MUIC_ADC_FACTORY_MODE_UART_ON: 363 case MAX8997_MUIC_ADC_FACTORY_MODE_UART_ON:
364 extcon_set_cable_state_(info->edev, EXTCON_DOCK, attached); 364 extcon_set_state_sync(info->edev, EXTCON_DOCK, attached);
365 break; 365 break;
366 default: 366 default:
367 dev_err(info->dev, "failed to detect %s dock device\n", 367 dev_err(info->dev, "failed to detect %s dock device\n",
@@ -384,7 +384,7 @@ static int max8997_muic_handle_jig_uart(struct max8997_muic_info *info,
384 return ret; 384 return ret;
385 } 385 }
386 386
387 extcon_set_cable_state_(info->edev, EXTCON_JIG, attached); 387 extcon_set_state_sync(info->edev, EXTCON_JIG, attached);
388 388
389 return 0; 389 return 0;
390} 390}
@@ -406,7 +406,7 @@ static int max8997_muic_adc_handler(struct max8997_muic_info *info)
406 return ret; 406 return ret;
407 break; 407 break;
408 case MAX8997_MUIC_ADC_MHL: 408 case MAX8997_MUIC_ADC_MHL:
409 extcon_set_cable_state_(info->edev, EXTCON_DISP_MHL, attached); 409 extcon_set_state_sync(info->edev, EXTCON_DISP_MHL, attached);
410 break; 410 break;
411 case MAX8997_MUIC_ADC_FACTORY_MODE_USB_OFF: 411 case MAX8997_MUIC_ADC_FACTORY_MODE_USB_OFF:
412 case MAX8997_MUIC_ADC_FACTORY_MODE_USB_ON: 412 case MAX8997_MUIC_ADC_FACTORY_MODE_USB_ON:
@@ -489,19 +489,19 @@ static int max8997_muic_chg_handler(struct max8997_muic_info *info)
489 } 489 }
490 break; 490 break;
491 case MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT: 491 case MAX8997_CHARGER_TYPE_DOWNSTREAM_PORT:
492 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_CDP, 492 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_CDP,
493 attached); 493 attached);
494 break; 494 break;
495 case MAX8997_CHARGER_TYPE_DEDICATED_CHG: 495 case MAX8997_CHARGER_TYPE_DEDICATED_CHG:
496 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_DCP, 496 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_DCP,
497 attached); 497 attached);
498 break; 498 break;
499 case MAX8997_CHARGER_TYPE_500MA: 499 case MAX8997_CHARGER_TYPE_500MA:
500 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_SLOW, 500 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_SLOW,
501 attached); 501 attached);
502 break; 502 break;
503 case MAX8997_CHARGER_TYPE_1A: 503 case MAX8997_CHARGER_TYPE_1A:
504 extcon_set_cable_state_(info->edev, EXTCON_CHG_USB_FAST, 504 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_FAST,
505 attached); 505 attached);
506 break; 506 break;
507 default: 507 default: