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

Commit 17b92927 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Input: edt-ft5x06 - simplify event reporting code



Now that input_mt_report_slot_state() returns true if slot is active we no
longer need a temporary for the slot state.

Tested-by: default avatarBenoit Parrot <bparrot@ti.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 904e782b
Loading
Loading
Loading
Loading
+4 −9
Original line number Original line Diff line number Diff line
@@ -229,7 +229,6 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)


	for (i = 0; i < tsdata->max_support_points; i++) {
	for (i = 0; i < tsdata->max_support_points; i++) {
		u8 *buf = &rdbuf[i * tplen + offset];
		u8 *buf = &rdbuf[i * tplen + offset];
		bool down;


		type = buf[0] >> 6;
		type = buf[0] >> 6;
		/* ignore Reserved events */
		/* ignore Reserved events */
@@ -247,16 +246,12 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
			swap(x, y);
			swap(x, y);


		id = (buf[2] >> 4) & 0x0f;
		id = (buf[2] >> 4) & 0x0f;
		down = type != TOUCH_EVENT_UP;


		input_mt_slot(tsdata->input, id);
		input_mt_slot(tsdata->input, id);
		input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, down);
		if (input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER,

					       type != TOUCH_EVENT_UP))
		if (!down)
			touchscreen_report_pos(tsdata->input, &tsdata->prop,
			continue;
					       x, y, true);

		touchscreen_report_pos(tsdata->input, &tsdata->prop, x, y,
				       true);
	}
	}


	input_mt_report_pointer_emulation(tsdata->input, true);
	input_mt_report_pointer_emulation(tsdata->input, true);