Revert "usbpd:Samsung usbpd too many detachment issue fix"
authora17671 <a17671@motorola.com>
Tue, 4 Dec 2018 08:32:58 +0000 (16:32 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:30:27 +0000 (17:30 +0800)
Reorg the fix of the detachment issue
Make sure rebooting with usb attached
does not break the adb
Mot-CR-fixed:(CR)

This reverts commit e2d064f8cb59ecf123cdaa8edc1c278397455153.

Change-Id: I052ed981f388c27ae98ce33024cd74c61e6b3981
Reviewed-on: https://gerrit.mot.com/1278905
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/ccic/s2mu106-usbpd.c

index b2ca82e50c05ef854e59c764c008a780082e76e1..02ea5f4ca61ea54ba2a94397f7958f2c29de654a 100644 (file)
@@ -2196,6 +2196,12 @@ static void s2mu106_usbpd_notify_detach(struct s2mu106_usbpd_data *pdic_data)
 {
        struct device *dev = pdic_data->dev;
 #if defined(CONFIG_IFCONN_NOTIFIER)
+       /* MUIC */
+       ifconn_event_work(pdic_data, IFCONN_NOTIFY_MUIC, IFCONN_NOTIFY_ID_ATTACH,
+                                                               IFCONN_NOTIFY_EVENT_DETACH, NULL);
+
+       ifconn_event_work(pdic_data, IFCONN_NOTIFY_MUIC, IFCONN_NOTIFY_ID_RID,
+                                                               IFCONN_NOTIFY_EVENT_DETACH, NULL);
 
        if (pdic_data->is_host > HOST_OFF || pdic_data->is_client > CLIENT_OFF) {
 #if defined(CONFIG_DUAL_ROLE_USB_INTF)
@@ -2224,6 +2230,10 @@ static void s2mu106_usbpd_notify_detach(struct s2mu106_usbpd_data *pdic_data)
                }
                pdic_data->typec_power_role = TYPEC_SINK;
                pdic_data->typec_data_role = TYPEC_DEVICE;
+               /* USB */
+               ifconn_event_work(pdic_data, IFCONN_NOTIFY_USB, IFCONN_NOTIFY_ID_USB,
+                                                                               IFCONN_NOTIFY_EVENT_DETACH, NULL);
+
 #endif
        }
 #else