From f53048ac57c281ddf79dd4186bfd2583c672b7cc Mon Sep 17 00:00:00 2001 From: Kim Taejeong Date: Thu, 24 May 2018 10:38:10 +0900 Subject: [PATCH] [9610][ERD] muic: support ifconn Change-Id: I8e997f4b2118b8eb6a237e79e976638df06ee749 Signed-off-by: Kim Taejeong --- drivers/muic/muic_manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/muic/muic_manager.c b/drivers/muic/muic_manager.c index 2043836f1d9d..d099446b7f1d 100644 --- a/drivers/muic/muic_manager.c +++ b/drivers/muic/muic_manager.c @@ -379,6 +379,7 @@ static bool muic_manager_is_valid_rid_open(struct muic_interface_t *muic_if, int #ifdef CONFIG_IFCONN_NOTIFIER static int muic_manager_handle_ccic_attach(struct muic_interface_t *muic_if, void *data) { + struct ccic_desc_t *ccic = muic_if->ccic; #ifdef CONFIG_IFCONN_NOTIFIER struct ifconn_notifier_template *pnoti = (struct ifconn_notifier_template *)data; @@ -393,6 +394,7 @@ static int muic_manager_handle_ccic_attach(struct muic_interface_t *muic_if, voi /* Attached */ if (pnoti->event == IFCONN_NOTIFY_EVENT_ATTACH) { pr_info("%s: Attach\n", __func__); + ccic->ccic_evt_attached = MUIC_CCIC_NOTI_ATTACH; } else { muic_manager_handle_ccic_detach(muic_if); } @@ -578,7 +580,6 @@ static int muic_manager_handle_ccic_rid(struct muic_interface_t *muic_if, void * case CCIC_RID_523K: case CCIC_RID_619K: vbus = muic_manager_get_vbus(muic_if); - muic_if->set_jig_state(muic_if->muic_data, true); muic_manager_handle_ccic_factory_jig(muic_if, rid, vbus); break; case CCIC_RID_OPEN: @@ -598,7 +599,6 @@ static int muic_manager_handle_ccic_rid(struct muic_interface_t *muic_if, void * /* RID OPEN + No VBUS = Assume detach */ muic_manager_handle_ccic_detach(muic_if); } - muic_if->set_jig_state(muic_if->muic_data, false); break; default: pr_err("%s:Undefined RID\n", __func__); @@ -726,7 +726,7 @@ static int muic_manager_handle_notification(struct notifier_block *nb, if (pnoti->id == attach) { pr_info("%s: NOTIFY_ID_ATTACH: %s\n", __func__, - pnoti->sub1 ? "Attached" : "Detached"); + pnoti->attach ? "Attached" : "Detached"); muic_manager_handle_ccic_attach(muic_if, data); } else if (pnoti->id == rid) { pr_info("%s: NOTIFY_ID_RID\n", __func__); -- 2.20.1