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

Commit 0f28e220 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: touchpanel: fix TP frozen when ST's TP firstly probe up"

parents 52801d7b b4b3c42c
Loading
Loading
Loading
Loading
+26 −2
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ static void fts_interrupt_enable(struct fts_ts_info *info);
static int fts_init_hw(struct fts_ts_info *info);
static int fts_mode_handler(struct fts_ts_info *info, int force);
static int fts_command(struct fts_ts_info *info, unsigned char cmd);

static void fts_unblank(struct fts_ts_info *info);
static int fts_chip_initialization(struct fts_ts_info *info);

void touch_callback(unsigned int status)
@@ -1487,8 +1487,12 @@ static int fts_init(struct fts_ts_info *info)

	error = fts_interrupt_install(info);

	if (error != OK)
	if (error != OK) {
		logError(1,  "%s Init (1) error (ERROR  = %08X)\n", error);
		return error;
	}

	fts_unblank(info);

	return error;
}
@@ -1773,6 +1777,26 @@ static int fts_fb_state_chg_callback(struct notifier_block *nb, unsigned long va

}

static void fts_unblank(struct fts_ts_info *info)
{
	int i;

	for (i = 0; i < TOUCH_ID_MAX; i++) {
		input_mt_slot(info->input_dev, i);
		input_mt_report_slot_state(info->input_dev,
			(i < FINGER_MAX) ? MT_TOOL_FINGER : MT_TOOL_PEN, 0);
	}
	input_sync(info->input_dev);

	info->resume_bit = 1;

	fts_mode_handler(info, 0);

	info->sensor_sleep = false;

	fts_enableInterrupt();
}

static struct notifier_block fts_noti_block = {
	.notifier_call = fts_fb_state_chg_callback,
};