rhodep:open charger mode;

kernel/tp:
	open charger mode;
	wait probe is ok that send cmd;

Change-Id: I186884262858227efdfcd5a6588b70e4414b1556
Signed-off-by: bchhq23 <bchhq23@motorola.com>
Reviewed-on: https://gerrit.mot.com/2153152
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
bchhq23 2021-12-23 18:07:34 +08:00 • committed by Jun Weng
commit de31178d74

View file

@ -741,11 +741,17 @@ static int goodix_ts_mmi_methods_power(struct device *dev, int on) {
static int goodix_ts_mmi_charger_mode(struct device *dev, int mode)
{
int ret = 0;
int timeout = 50;
struct platform_device *pdev;
struct goodix_ts_core *core_data;
const struct goodix_ts_hw_ops *hw_ops;
GET_GOODIX_DATA(dev);
/* 5000ms timeout */
while (core_data->init_stage < CORE_INIT_STAGE2 && timeout--)
msleep(100);
hw_ops = core_data->hw_ops;
goodix_ts_send_cmd(core_data, CHARGER_MODE_CMD, 5, mode, 0x00);