Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de9ce301 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: touchscreen: st: touch reflash check"

parents 957c097c 5eaaedc4
Loading
Loading
Loading
Loading
+7 −8
Original line number Original line Diff line number Diff line
@@ -3291,8 +3291,9 @@ static void fts_fw_update_auto(struct work_struct *work)
	info = container_of(fwu_work, struct fts_ts_info, fwu_work);
	info = container_of(fwu_work, struct fts_ts_info, fwu_work);
	logError(0, "%s Fw Auto Update is starting...\n", tag);
	logError(0, "%s Fw Auto Update is starting...\n", tag);


	fts_chip_powercycle(info);
	retval = flashProcedure(PATH_FILE_FW, crc_status, 1);
	retval = flashProcedure(PATH_FILE_FW, crc_status, 1);
	if ((retval & ERROR_MEMH_READ) || (retval & ERROR_FW_NO_UPDATE)) {
	if (retval == (ERROR_FW_NO_UPDATE | ERROR_FLASH_BURN_FAILED)) {
		logError(1, "%s %s: no firmware file or no newer firmware!\n",
		logError(1, "%s %s: no firmware file or no newer firmware!\n",
			tag, __func__);
			tag, __func__);
		goto NO_FIRMWARE_UPDATE;
		goto NO_FIRMWARE_UPDATE;
@@ -3704,12 +3705,6 @@ static int fts_init_afterProbe(struct fts_ts_info *info)
	/* enable the interrupt */
	/* enable the interrupt */
	error |= fts_enableInterrupt();
	error |= fts_enableInterrupt();


#if defined(CONFIG_FB_MSM)
	error |= fb_register_client(&info->notifier);
#else
	error |= msm_drm_register_client(&info->notifier);
#endif

	if (error < OK)
	if (error < OK)
		logError(1, "%s %s Init after Probe error (ERROR = %08X)\n",
		logError(1, "%s %s Init after Probe error (ERROR = %08X)\n",
			tag, __func__, error);
			tag, __func__, error);
@@ -4805,7 +4800,11 @@ static int fts_probe(struct i2c_client *client,
			msecs_to_jiffies(EXP_FN_WORK_DELAY_MS));
			msecs_to_jiffies(EXP_FN_WORK_DELAY_MS));
	logError(1, "%s Probe Finished!\n", tag);
	logError(1, "%s Probe Finished!\n", tag);


	info->event_mask = 0;
#if defined(CONFIG_FB_MSM)
	error |= fb_register_client(&info->notifier);
#else
	error |= msm_drm_register_client(&info->notifier);
#endif


	return OK;
	return OK;


+7 −23
Original line number Original line Diff line number Diff line
@@ -1039,20 +1039,6 @@ int flash_burn(struct Firmware fw, int force_burn, int keep_cx)
	logError(0, "%s Programming Procedure for flashing started:\n\n", tag);
	logError(0, "%s Programming Procedure for flashing started:\n\n", tag);


	logError(0, "%s 1) SYSTEM RESET:\n", tag);
	logError(0, "%s 1) SYSTEM RESET:\n", tag);
	res = fts_system_reset();
	if (res < 0) {
		logError(1, "%s system reset FAILED!\n", tag);
		/**
		 * if there is no firmware i will not
		 * get the controller ready event and
		 * there will be a timeout but i can
		 * keep going, but if there is an I2C
		 * error i have to exit
		 */
		if (res != (ERROR_SYSTEM_RESET_FAIL | ERROR_TIMEOUT))
			return (res | ERROR_FLASH_BURN_FAILED);
	} else
		logError(0, "%s system reset COMPLETED!\n\n", tag);


	logError(0, "%s 2) WARM BOOT:\n", tag);
	logError(0, "%s 2) WARM BOOT:\n", tag);
	res = fts_warm_boot();
	res = fts_warm_boot();
@@ -1136,16 +1122,14 @@ int flash_burn(struct Firmware fw, int force_burn, int keep_cx)
		return (res | ERROR_FLASH_BURN_FAILED);
		return (res | ERROR_FLASH_BURN_FAILED);
	}
	}


	for (res = 0; res < EXTERNAL_RELEASE_INFO_SIZE; res++) {
	if ((ftsInfo.u16_fwVer != fw.fw_ver)
		////external release is prined during readChipInfo
		&& (ftsInfo.u16_cfgId != fw.config_id)) {
		if (fw.externalRelease[res] != ftsInfo.u8_extReleaseInfo[res]) {
		pr_err("Firmware is different from the old!\n");
		pr_err("Firmware is different from the old!\n");
		logError(1, "%s fw: %x != %x, conf: %x != %x\n",
		logError(1, "%s fw: %x != %x, conf: %x != %x\n",
			tag, ftsInfo.u16_fwVer, fw.fw_ver,
			tag, ftsInfo.u16_fwVer, fw.fw_ver,
			ftsInfo.u16_cfgId, fw.config_id);
			ftsInfo.u16_cfgId, fw.config_id);
		return ERROR_FLASH_BURN_FAILED;
		return ERROR_FLASH_BURN_FAILED;
	}
	}
	}


	logError(0, "%s Final check OK! fw: %02X , conf: %02X\n",
	logError(0, "%s Final check OK! fw: %02X , conf: %02X\n",
		tag, ftsInfo.u16_fwVer, ftsInfo.u16_cfgId);
		tag, ftsInfo.u16_fwVer, ftsInfo.u16_cfgId);