From: Meng Dongyang Date: Tue, 11 Oct 2016 09:25:14 +0000 (+0800) Subject: power: rk818_charger: get cable state when usb charge function init X-Git-Tag: firefly_0821_release~1411 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4221c07f2c1db32ffa44eed68bd7788ade2e4a9b;p=firefly-linux-kernel-4.4.55.git power: rk818_charger: get cable state when usb charge function init RK818 will miss the notify of charge type changing because the charge cable state is init when u2phy probe but rk818 probe after u2phy. So we need to get the charge cable state when rk818 probe. Change-Id: I3682d764ae3f9a56a1ba85ba8b81ea7f1aacdf49 Signed-off-by: Meng Dongyang --- diff --git a/drivers/power/rk818_charger.c b/drivers/power/rk818_charger.c index 832f115f9bf7..aeff14f20498 100644 --- a/drivers/power/rk818_charger.c +++ b/drivers/power/rk818_charger.c @@ -1060,6 +1060,8 @@ static long rk818_cg_init_usb(struct rk818_charger *cg) cg->cable_edev = edev; + schedule_delayed_work(&cg->host_work, 0); + CG_INFO("register typec extcon evt notifier\n"); } else { INIT_DELAYED_WORK(&cg->usb_work, rk818_cg_bc_evt_worker);