From aee37f56c2e72d9fce99fa1906880116f8ec4fc8 Mon Sep 17 00:00:00 2001 From: haojl2 Date: Mon, 23 Sep 2019 21:32:14 +0800 Subject: [PATCH] goodix_gtx8_v1430_mmi: update FW automatically TP: Moto TP FW upload script is not bringuped for this driver. So update FW automatically when bootup. Change-Id: Iabc14f37f0207bd535f25e02574ef9eefae8b358 Signed-off-by: haojl2 Reviewed-on: https://gerrit.mot.com/1426462 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Tao Sun Submit-Approved: Jira Key --- .../touchscreen/goodix_gtx8_v1430_mmi/goodix_gtx8_update.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/touchscreen/goodix_gtx8_v1430_mmi/goodix_gtx8_update.c b/drivers/input/touchscreen/goodix_gtx8_v1430_mmi/goodix_gtx8_update.c index a527396d39fb..40fe4373343f 100644 --- a/drivers/input/touchscreen/goodix_gtx8_v1430_mmi/goodix_gtx8_update.c +++ b/drivers/input/touchscreen/goodix_gtx8_v1430_mmi/goodix_gtx8_update.c @@ -1518,6 +1518,12 @@ static int goodix_fw_update_init(struct goodix_ts_core *core_data, goodix_fw_update_ctrl.initialized = 1; err_out: mutex_unlock(&goodix_fw_update_ctrl.mutex); + if (!ret) { + goodix_do_fw_update(UPDATE_MODE_SRC_REQUEST); + if (ret) + ts_err("fw update failed, %d", ret); + } + return ret; }