Lines Matching +full:accessory +full:- +full:mode +full:- +full:audio
1 // SPDX-License-Identifier: GPL-2.0+
3 // extcon-max77693.c - MAX77693 extcon driver to support MAX77693 MUIC
8 #include <linux/devm-helpers.h>
18 #include <linux/mfd/max77693-common.h>
19 #include <linux/mfd/max77693-private.h>
20 #include <linux/extcon-provider.h>
24 #define DEV_NAME "max77693-muic"
30 * extcon-max77693 driver use 'default_init_data' to bring up base operation
35 /* STATUS2 - [3]ChgDetRun */
39 /* INTMASK1 - Unmask [3]ADC1KM,[0]ADCM */
44 /* INTMASK2 - Unmask [0]ChgTypM */
48 /* INTMASK3 - Mask all of interrupts */
129 { MAX77693_MUIC_IRQ_INT1_ADC, "muic-ADC" },
130 { MAX77693_MUIC_IRQ_INT1_ADC_LOW, "muic-ADCLOW" },
131 { MAX77693_MUIC_IRQ_INT1_ADC_ERR, "muic-ADCError" },
132 { MAX77693_MUIC_IRQ_INT1_ADC1K, "muic-ADC1K" },
133 { MAX77693_MUIC_IRQ_INT2_CHGTYP, "muic-CHGTYP" },
134 { MAX77693_MUIC_IRQ_INT2_CHGDETREUN, "muic-CHGDETREUN" },
135 { MAX77693_MUIC_IRQ_INT2_DCDTMR, "muic-DCDTMR" },
136 { MAX77693_MUIC_IRQ_INT2_DXOVP, "muic-DXOVP" },
137 { MAX77693_MUIC_IRQ_INT2_VBVOLT, "muic-VBVOLT" },
138 { MAX77693_MUIC_IRQ_INT2_VIDRM, "muic-VIDRM" },
139 { MAX77693_MUIC_IRQ_INT3_EOC, "muic-EOC" },
140 { MAX77693_MUIC_IRQ_INT3_CGMBC, "muic-CGMBC" },
141 { MAX77693_MUIC_IRQ_INT3_OVP, "muic-OVP" },
142 { MAX77693_MUIC_IRQ_INT3_MBCCHG_ERR, "muic-MBCCHG_ERR" },
143 { MAX77693_MUIC_IRQ_INT3_CHG_ENABLED, "muic-CHG_ENABLED" },
144 { MAX77693_MUIC_IRQ_INT3_BAT_DET, "muic-BAT_DET" },
147 /* Define supported accessory type */
184 * ADC1K bit is used to separate specific accessory.
212 * max77693_muic_set_debounce_time - Set the debounce time of ADC
231 ret = regmap_write(info->max77693->regmap_muic, in max77693_muic_set_debounce_time()
235 dev_err(info->dev, "failed to set ADC debounce time\n"); in max77693_muic_set_debounce_time()
240 dev_err(info->dev, "invalid ADC debounce time\n"); in max77693_muic_set_debounce_time()
241 return -EINVAL; in max77693_muic_set_debounce_time()
248 * max77693_muic_set_path - Set hardware line according to attached cable
268 ret = regmap_update_bits(info->max77693->regmap_muic, in max77693_muic_set_path()
271 dev_err(info->dev, "failed to update MUIC register\n"); in max77693_muic_set_path()
280 ret = regmap_update_bits(info->max77693->regmap_muic, in max77693_muic_set_path()
285 dev_err(info->dev, "failed to update MUIC register\n"); in max77693_muic_set_path()
289 dev_info(info->dev, in max77693_muic_set_path()
297 * max77693_muic_get_cable_type - Return cable type and check cable state
304 * - MAX77693_CABLE_GROUP_ADC
305 * - MAX77693_CABLE_GROUP_ADC_GND
306 * - MAX77693_CABLE_GROUP_CHG
307 * - MAX77693_CABLE_GROUP_VBVOLT
325 adc = info->status[0] & MAX77693_STATUS1_ADC_MASK; in max77693_muic_get_cable_type()
330 * (info->prev_cable_type) for handling cable when cable is in max77693_muic_get_cable_type()
336 cable_type = info->prev_cable_type; in max77693_muic_get_cable_type()
337 info->prev_cable_type = MAX77693_MUIC_ADC_OPEN; in max77693_muic_get_cable_type()
341 cable_type = info->prev_cable_type = adc; in max77693_muic_get_cable_type()
349 adc = info->status[0] & MAX77693_STATUS1_ADC_MASK; in max77693_muic_get_cable_type()
354 * (info->prev_cable_type/_gnd) for handling cable when cable in max77693_muic_get_cable_type()
360 cable_type = info->prev_cable_type_gnd; in max77693_muic_get_cable_type()
361 info->prev_cable_type_gnd = MAX77693_MUIC_ADC_OPEN; in max77693_muic_get_cable_type()
365 adclow = info->status[0] & MAX77693_STATUS1_ADCLOW_MASK; in max77693_muic_get_cable_type()
367 adc1k = info->status[0] & MAX77693_STATUS1_ADC1K_MASK; in max77693_muic_get_cable_type()
370 vbvolt = info->status[1] & MAX77693_STATUS2_VBVOLT_MASK; in max77693_muic_get_cable_type()
377 * [0x1| 0| 1| 0] Audio Video cable with load in max77693_muic_get_cable_type()
386 info->prev_cable_type = adc; in max77693_muic_get_cable_type()
387 info->prev_cable_type_gnd = cable_type; in max77693_muic_get_cable_type()
396 chg_type = info->status[1] & MAX77693_STATUS2_CHGTYP_MASK; in max77693_muic_get_cable_type()
402 cable_type = info->prev_chg_type; in max77693_muic_get_cable_type()
403 info->prev_chg_type = MAX77693_CHARGER_TYPE_NONE; in max77693_muic_get_cable_type()
409 * type(info->prev_chg_type) for handling cable when in max77693_muic_get_cable_type()
412 cable_type = info->prev_chg_type = chg_type; in max77693_muic_get_cable_type()
421 adc = info->status[0] & MAX77693_STATUS1_ADC_MASK; in max77693_muic_get_cable_type()
423 chg_type = info->status[1] & MAX77693_STATUS2_CHGTYP_MASK; in max77693_muic_get_cable_type()
436 vbvolt = info->status[1] & MAX77693_STATUS2_VBVOLT_MASK; in max77693_muic_get_cable_type()
442 dev_err(info->dev, "Unknown cable group (%d)\n", group); in max77693_muic_get_cable_type()
443 cable_type = -EINVAL; in max77693_muic_get_cable_type()
458 dev_info(info->dev, in max77693_muic_dock_handler()
463 case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ in max77693_muic_dock_handler()
466 * The Dock-Smart device need surely external power supply. in max77693_muic_dock_handler()
468 * user can't use Dock-Smart for desktop mode. in max77693_muic_dock_handler()
473 dev_warn(info->dev, in max77693_muic_dock_handler()
480 * - Dock device include three type of cable which in max77693_muic_dock_handler()
481 * are HDMI, USB for mouse/keyboard and micro-usb port in max77693_muic_dock_handler()
483 * power supply(USB/TA cable through micro-usb cable). Dock in max77693_muic_dock_handler()
485 * monitor and mouse/keyboard for desktop mode. in max77693_muic_dock_handler()
488 * - Support MHL in max77693_muic_dock_handler()
489 * - Support external output feature of audio in max77693_muic_dock_handler()
490 * - Support charging through micro-usb port without data in max77693_muic_dock_handler()
492 * - Support charging and data connection through micro-usb port in max77693_muic_dock_handler()
495 * - Support OTG(On-The-Go) device (Ex: Mouse/Keyboard) in max77693_muic_dock_handler()
497 ret = max77693_muic_set_path(info, info->path_usb, attached); in max77693_muic_dock_handler()
501 extcon_set_state_sync(info->edev, EXTCON_DOCK, attached); in max77693_muic_dock_handler()
502 extcon_set_state_sync(info->edev, EXTCON_DISP_MHL, attached); in max77693_muic_dock_handler()
504 case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ in max77693_muic_dock_handler()
507 case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ in max77693_muic_dock_handler()
510 extcon_set_state_sync(info->edev, EXTCON_USB, false); in max77693_muic_dock_handler()
511 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_SDP, in max77693_muic_dock_handler()
516 dev_err(info->dev, "failed to detect %s dock device\n", in max77693_muic_dock_handler()
518 return -EINVAL; in max77693_muic_dock_handler()
521 /* Dock-Car/Desk/Audio, PATH:AUDIO */ in max77693_muic_dock_handler()
526 extcon_set_state_sync(info->edev, dock_id, attached); in max77693_muic_dock_handler()
535 struct input_dev *dock = info->dock; in max77693_muic_dock_button_handler()
539 case MAX77693_MUIC_ADC_REMOTE_S3_BUTTON-1 in max77693_muic_dock_button_handler()
544 case MAX77693_MUIC_ADC_REMOTE_S7_BUTTON-1 in max77693_muic_dock_button_handler()
557 case MAX77693_MUIC_ADC_REMOTE_S12_BUTTON-1 in max77693_muic_dock_button_handler()
563 dev_err(info->dev, in max77693_muic_dock_button_handler()
566 return -EINVAL; in max77693_muic_dock_button_handler()
592 extcon_set_state_sync(info->edev, EXTCON_USB_HOST, attached); in max77693_muic_adc_ground_handler()
595 /* Audio Video Cable with load, PATH:AUDIO */ in max77693_muic_adc_ground_handler()
600 extcon_set_state_sync(info->edev, EXTCON_USB, attached); in max77693_muic_adc_ground_handler()
601 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_SDP, in max77693_muic_adc_ground_handler()
607 extcon_set_state_sync(info->edev, EXTCON_DISP_MHL, attached); in max77693_muic_adc_ground_handler()
610 dev_err(info->dev, "failed to detect %s cable of gnd type\n", in max77693_muic_adc_ground_handler()
612 return -EINVAL; in max77693_muic_adc_ground_handler()
624 dev_info(info->dev, in max77693_muic_jig_handler()
640 dev_err(info->dev, "failed to detect %s jig cable\n", in max77693_muic_jig_handler()
642 return -EINVAL; in max77693_muic_jig_handler()
649 extcon_set_state_sync(info->edev, EXTCON_JIG, attached); in max77693_muic_jig_handler()
661 /* Check accessory state which is either detached or attached */ in max77693_muic_adc_handler()
665 dev_info(info->dev, in max77693_muic_adc_handler()
668 info->prev_cable_type); in max77693_muic_adc_handler()
672 /* USB_HOST/MHL/Audio */ in max77693_muic_adc_handler()
684 case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ in max77693_muic_adc_handler()
685 case MAX77693_MUIC_ADC_AUDIO_MODE_REMOTE: /* Dock-Desk */ in max77693_muic_adc_handler()
686 case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ in max77693_muic_adc_handler()
707 * - the Prev/Next/Volume Up/Volume Down/Play-Pause button in max77693_muic_adc_handler()
716 button_type = info->prev_button_type = cable_type; in max77693_muic_adc_handler()
718 button_type = info->prev_button_type; in max77693_muic_adc_handler()
744 * This accessory isn't used in general case if it is specially in max77693_muic_adc_handler()
745 * needed to detect additional accessory, should implement in max77693_muic_adc_handler()
746 * proper operation when this accessory is attached/detached. in max77693_muic_adc_handler()
748 dev_info(info->dev, in max77693_muic_adc_handler()
749 "accessory is %s but it isn't used (adc:0x%x)\n", in max77693_muic_adc_handler()
751 return -EAGAIN; in max77693_muic_adc_handler()
753 dev_err(info->dev, in max77693_muic_adc_handler()
754 "failed to detect %s accessory (adc:0x%x)\n", in max77693_muic_adc_handler()
756 return -EINVAL; in max77693_muic_adc_handler()
774 dev_info(info->dev, in max77693_muic_chg_handler()
777 chg_type, info->prev_chg_type); in max77693_muic_chg_handler()
792 * - MHL cable include two port(HDMI line and separate in max77693_muic_chg_handler()
793 * micro-usb port. When the target connect MHL cable, in max77693_muic_chg_handler()
799 * - Support MHL in max77693_muic_chg_handler()
800 * - Support charging through micro-usb port without in max77693_muic_chg_handler()
803 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_DCP, in max77693_muic_chg_handler()
805 extcon_set_state_sync(info->edev, EXTCON_DISP_MHL, in max77693_muic_chg_handler()
815 case MAX77693_MUIC_ADC_AV_CABLE_NOLOAD: /* Dock-Audio */ in max77693_muic_chg_handler()
817 * Dock-Audio device with USB/TA cable in max77693_muic_chg_handler()
818 * - Dock device include two port(Dock-Audio and micro- in max77693_muic_chg_handler()
819 * usb port). When the target connect Dock-Audio device, in max77693_muic_chg_handler()
824 * Features of 'USB/TA cable with Dock-Audio device' in max77693_muic_chg_handler()
825 * - Support external output feature of audio. in max77693_muic_chg_handler()
826 * - Support charging through micro-usb port without in max77693_muic_chg_handler()
829 extcon_set_state_sync(info->edev, EXTCON_USB, in max77693_muic_chg_handler()
831 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_SDP, in max77693_muic_chg_handler()
835 extcon_set_state_sync(info->edev, EXTCON_DOCK, in max77693_muic_chg_handler()
838 case MAX77693_MUIC_ADC_RESERVED_ACC_3: /* Dock-Smart */ in max77693_muic_chg_handler()
840 * Dock-Smart device with USB/TA cable in max77693_muic_chg_handler()
841 * - Dock-Desk device include three type of cable which in max77693_muic_chg_handler()
842 * are HDMI, USB for mouse/keyboard and micro-usb port in max77693_muic_chg_handler()
843 * for USB/TA cable. Dock-Smart device need always in max77693_muic_chg_handler()
844 * exteranl power supply(USB/TA cable through micro-usb in max77693_muic_chg_handler()
845 * cable). Dock-Smart device support screen output of in max77693_muic_chg_handler()
847 * desktop mode. in max77693_muic_chg_handler()
849 * Features of 'USB/TA cable with Dock-Smart device' in max77693_muic_chg_handler()
850 * - Support MHL in max77693_muic_chg_handler()
851 * - Support external output feature of audio in max77693_muic_chg_handler()
852 * - Support charging through micro-usb port without in max77693_muic_chg_handler()
854 * - Support charging and data connection through micro- in max77693_muic_chg_handler()
857 * - Support OTG(On-The-Go) device (Ex: Mouse/Keyboard) in max77693_muic_chg_handler()
859 ret = max77693_muic_set_path(info, info->path_usb, in max77693_muic_chg_handler()
864 extcon_set_state_sync(info->edev, EXTCON_DOCK, in max77693_muic_chg_handler()
866 extcon_set_state_sync(info->edev, EXTCON_DISP_MHL, in max77693_muic_chg_handler()
875 * When MHL(with USB/TA cable) or Dock-Audio with USB/TA in max77693_muic_chg_handler()
877 * - 'MAX77693_MUIC_IRQ_INT1_ADC' for detecting in max77693_muic_chg_handler()
878 * MHL/Dock-Audio. in max77693_muic_chg_handler()
879 * - 'MAX77693_MUIC_IRQ_INT2_CHGTYP' for detecting in max77693_muic_chg_handler()
880 * USB/TA cable connected to MHL or Dock-Audio. in max77693_muic_chg_handler()
895 ret = max77693_muic_set_path(info, info->path_usb, in max77693_muic_chg_handler()
900 extcon_set_state_sync(info->edev, EXTCON_USB, in max77693_muic_chg_handler()
902 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_SDP, in max77693_muic_chg_handler()
907 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_DCP, in max77693_muic_chg_handler()
913 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_CDP, in max77693_muic_chg_handler()
917 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_SLOW, in max77693_muic_chg_handler()
921 extcon_set_state_sync(info->edev, EXTCON_CHG_USB_FAST, in max77693_muic_chg_handler()
927 dev_err(info->dev, in max77693_muic_chg_handler()
928 "failed to detect %s accessory (chg_type:0x%x)\n", in max77693_muic_chg_handler()
930 return -EINVAL; in max77693_muic_chg_handler()
940 int irq_type = -1; in max77693_muic_irq_work()
943 if (!info->edev) in max77693_muic_irq_work()
946 mutex_lock(&info->mutex); in max77693_muic_irq_work()
949 if (info->irq == muic_irqs[i].virq) in max77693_muic_irq_work()
952 ret = regmap_bulk_read(info->max77693->regmap_muic, in max77693_muic_irq_work()
953 MAX77693_MUIC_REG_STATUS1, info->status, 2); in max77693_muic_irq_work()
955 dev_err(info->dev, "failed to read MUIC register\n"); in max77693_muic_irq_work()
956 mutex_unlock(&info->mutex); in max77693_muic_irq_work()
966 * Handle all of accessory except for in max77693_muic_irq_work()
967 * type of charger accessory. in max77693_muic_irq_work()
977 /* Handle charger accessory */ in max77693_muic_irq_work()
988 dev_err(info->dev, "muic interrupt: irq %d occurred\n", in max77693_muic_irq_work()
990 mutex_unlock(&info->mutex); in max77693_muic_irq_work()
995 dev_err(info->dev, "failed to handle MUIC interrupt\n"); in max77693_muic_irq_work()
997 mutex_unlock(&info->mutex); in max77693_muic_irq_work()
1004 info->irq = irq; in max77693_muic_irq_handler()
1005 schedule_work(&info->irq_work); in max77693_muic_irq_handler()
1022 mutex_lock(&info->mutex); in max77693_muic_detect_accessory()
1024 /* Read STATUSx register to detect accessory */ in max77693_muic_detect_accessory()
1025 ret = regmap_bulk_read(info->max77693->regmap_muic, in max77693_muic_detect_accessory()
1026 MAX77693_MUIC_REG_STATUS1, info->status, 2); in max77693_muic_detect_accessory()
1028 dev_err(info->dev, "failed to read MUIC register\n"); in max77693_muic_detect_accessory()
1029 mutex_unlock(&info->mutex); in max77693_muic_detect_accessory()
1038 dev_err(info->dev, "Cannot detect accessory\n"); in max77693_muic_detect_accessory()
1039 mutex_unlock(&info->mutex); in max77693_muic_detect_accessory()
1049 dev_err(info->dev, "Cannot detect charger accessory\n"); in max77693_muic_detect_accessory()
1050 mutex_unlock(&info->mutex); in max77693_muic_detect_accessory()
1055 mutex_unlock(&info->mutex); in max77693_muic_detect_accessory()
1070 struct max77693_dev *max77693 = dev_get_drvdata(pdev->dev.parent); in max77693_muic_probe()
1071 struct max77693_platform_data *pdata = dev_get_platdata(max77693->dev); in max77693_muic_probe()
1082 info = devm_kzalloc(&pdev->dev, sizeof(struct max77693_muic_info), in max77693_muic_probe()
1085 return -ENOMEM; in max77693_muic_probe()
1087 info->dev = &pdev->dev; in max77693_muic_probe()
1088 info->max77693 = max77693; in max77693_muic_probe()
1089 if (info->max77693->regmap_muic) { in max77693_muic_probe()
1090 dev_dbg(&pdev->dev, "allocate register map\n"); in max77693_muic_probe()
1092 info->max77693->regmap_muic = devm_regmap_init_i2c( in max77693_muic_probe()
1093 info->max77693->i2c_muic, in max77693_muic_probe()
1095 if (IS_ERR(info->max77693->regmap_muic)) { in max77693_muic_probe()
1096 ret = PTR_ERR(info->max77693->regmap_muic); in max77693_muic_probe()
1097 dev_err(max77693->dev, in max77693_muic_probe()
1104 info->dock = devm_input_allocate_device(&pdev->dev); in max77693_muic_probe()
1105 if (!info->dock) { in max77693_muic_probe()
1106 dev_err(&pdev->dev, "%s: failed to allocate input\n", __func__); in max77693_muic_probe()
1107 return -ENOMEM; in max77693_muic_probe()
1109 info->dock->name = "max77693-muic/dock"; in max77693_muic_probe()
1110 info->dock->phys = "max77693-muic/extcon"; in max77693_muic_probe()
1111 info->dock->dev.parent = &pdev->dev; in max77693_muic_probe()
1113 __set_bit(EV_REP, info->dock->evbit); in max77693_muic_probe()
1115 input_set_capability(info->dock, EV_KEY, KEY_VOLUMEUP); in max77693_muic_probe()
1116 input_set_capability(info->dock, EV_KEY, KEY_VOLUMEDOWN); in max77693_muic_probe()
1117 input_set_capability(info->dock, EV_KEY, KEY_PLAYPAUSE); in max77693_muic_probe()
1118 input_set_capability(info->dock, EV_KEY, KEY_PREVIOUSSONG); in max77693_muic_probe()
1119 input_set_capability(info->dock, EV_KEY, KEY_NEXTSONG); in max77693_muic_probe()
1121 ret = input_register_device(info->dock); in max77693_muic_probe()
1123 dev_err(&pdev->dev, "Cannot register input device error(%d)\n", in max77693_muic_probe()
1129 mutex_init(&info->mutex); in max77693_muic_probe()
1131 ret = devm_work_autocancel(&pdev->dev, &info->irq_work, in max77693_muic_probe()
1141 virq = regmap_irq_get_virq(max77693->irq_data_muic, in max77693_muic_probe()
1142 muic_irq->irq); in max77693_muic_probe()
1144 return -EINVAL; in max77693_muic_probe()
1145 muic_irq->virq = virq; in max77693_muic_probe()
1147 ret = devm_request_threaded_irq(&pdev->dev, virq, NULL, in max77693_muic_probe()
1150 muic_irq->name, info); in max77693_muic_probe()
1152 dev_err(&pdev->dev, in max77693_muic_probe()
1154 muic_irq->irq, ret); in max77693_muic_probe()
1160 info->edev = devm_extcon_dev_allocate(&pdev->dev, in max77693_muic_probe()
1162 if (IS_ERR(info->edev)) { in max77693_muic_probe()
1163 dev_err(&pdev->dev, "failed to allocate memory for extcon\n"); in max77693_muic_probe()
1164 return PTR_ERR(info->edev); in max77693_muic_probe()
1167 ret = devm_extcon_dev_register(&pdev->dev, info->edev); in max77693_muic_probe()
1169 dev_err(&pdev->dev, "failed to register extcon device\n"); in max77693_muic_probe()
1174 if (pdata && pdata->muic_data) { in max77693_muic_probe()
1175 init_data = pdata->muic_data->init_data; in max77693_muic_probe()
1176 num_init_data = pdata->muic_data->num_init_data; in max77693_muic_probe()
1183 regmap_write(info->max77693->regmap_muic, in max77693_muic_probe()
1188 if (pdata && pdata->muic_data) { in max77693_muic_probe()
1190 = pdata->muic_data; in max77693_muic_probe()
1196 if (muic_pdata->path_uart) in max77693_muic_probe()
1197 info->path_uart = muic_pdata->path_uart; in max77693_muic_probe()
1199 info->path_uart = MAX77693_CONTROL1_SW_UART; in max77693_muic_probe()
1201 if (muic_pdata->path_usb) in max77693_muic_probe()
1202 info->path_usb = muic_pdata->path_usb; in max77693_muic_probe()
1204 info->path_usb = MAX77693_CONTROL1_SW_USB; in max77693_muic_probe()
1210 if (muic_pdata->detcable_delay_ms) in max77693_muic_probe()
1212 msecs_to_jiffies(muic_pdata->detcable_delay_ms); in max77693_muic_probe()
1216 info->path_usb = MAX77693_CONTROL1_SW_USB; in max77693_muic_probe()
1217 info->path_uart = MAX77693_CONTROL1_SW_UART; in max77693_muic_probe()
1222 ret = regmap_bulk_read(info->max77693->regmap_muic, in max77693_muic_probe()
1223 MAX77693_MUIC_REG_STATUS1, info->status, 2); in max77693_muic_probe()
1225 dev_err(info->dev, "failed to read MUIC register\n"); in max77693_muic_probe()
1232 max77693_muic_set_path(info, info->path_uart, true); in max77693_muic_probe()
1235 ret = regmap_read(info->max77693->regmap_muic, in max77693_muic_probe()
1238 dev_err(&pdev->dev, "failed to read revision number\n"); in max77693_muic_probe()
1241 dev_info(info->dev, "device ID : 0x%x\n", id); in max77693_muic_probe()
1247 * Detect accessory after completing the initialization of platform in max77693_muic_probe()
1249 * - Use delayed workqueue to detect cable state and then in max77693_muic_probe()
1254 INIT_DELAYED_WORK(&info->wq_detcable, max77693_muic_detect_cable_wq); in max77693_muic_probe()
1255 queue_delayed_work(system_power_efficient_wq, &info->wq_detcable, in max77693_muic_probe()
1262 { .compatible = "maxim,max77693-muic", },
1280 MODULE_ALIAS("platform:max77693-muic");