From: Junhan Date: Wed, 27 Nov 2019 03:41:11 +0000 (+0900) Subject: [9610] usbpd change abnormal detection threshold/time X-Git-Url: https://git.stricted.de/?p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git;a=commitdiff_plain;h=68da0823e0ca20687b367707220ed6a486cb2d18 [9610] usbpd change abnormal detection threshold/time Change-Id: I44cb561da55964d9f5861eef194f3756371428f5 Signed-off-by: Junhan --- diff --git a/drivers/ccic/s2mu106-usbpd.c b/drivers/ccic/s2mu106-usbpd.c index 97a966e4582b..c5b277dd4b1b 100644 --- a/drivers/ccic/s2mu106-usbpd.c +++ b/drivers/ccic/s2mu106-usbpd.c @@ -2115,9 +2115,10 @@ static int s2mu106_usbpd_check_abnormal_attach(struct s2mu106_usbpd_data *pdic_d struct i2c_client *i2c = pdic_data->i2c; u8 data = 0; - s2mu106_usbpd_set_threshold(pdic_data, PLUG_CTRL_RP, - S2MU106_THRESHOLD_1285MV); - msleep(20); + pr_info("%s, try val=1100mV\n", __func__); + + s2mu106_usbpd_set_threshold(pdic_data, PLUG_CTRL_RP, 30); + msleep(80); s2mu106_usbpd_read_reg(i2c, S2MU106_REG_PLUG_MON2, &data); if ((data & S2MU106_PR_MASK) == S2MU106_PDIC_SOURCE) @@ -2417,6 +2418,7 @@ static int s2mu106_check_port_detect(struct s2mu106_usbpd_data *pdic_data) dev_err(&i2c->dev, "%s, abnormal attach\n", __func__); return -1; } + s2mu106_usbpd_write_reg(i2c, S2MU106_REG_PLUG_CTRL_SET_RP, S2MU106_THRESHOLD_2057MV); ret = s2mu106_usbpd_check_accessory(pdic_data); if (ret < 0) { dev_info(&i2c->dev, "%s attach accessory\n", __func__);