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

Commit 31175a83 authored by Ping Cheng's avatar Ping Cheng Committed by Dmitry Torokhov
Browse files

Input: wacom - use switch statement for wacom_tpc_irq()



And add two new data formats.

Tested-by: default avatarChris Bagwell <chris@cnpbagwell.com>
Reviewed-by: default avatarChris Bagwell <chris@cnpbagwell.com>
Signed-off-by: default avatarPing Cheng <pingc@wacom.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 8b4a0c1f
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -832,12 +832,24 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)

	dbg("wacom_tpc_irq: received report #%d", data[0]);

	if (len == WACOM_PKGLEN_TPC1FG || data[0] == WACOM_REPORT_TPC1FG)
	switch (len) {
	case WACOM_PKGLEN_TPC1FG:
		 return wacom_tpc_single_touch(wacom, len);
	else if (data[0] == WACOM_REPORT_TPC2FG)

	case WACOM_PKGLEN_TPC2FG:
 		return wacom_tpc_mt_touch(wacom);
	else if (data[0] == WACOM_REPORT_PENABLED)

	default:
		switch (data[0]) {
		case WACOM_REPORT_TPC1FG:
		case WACOM_REPORT_TPCHID:
		case WACOM_REPORT_TPCST:
			return wacom_tpc_single_touch(wacom, len);

		case WACOM_REPORT_PENABLED:
			return wacom_tpc_pen(wacom);
		}
	}

	return 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@
#define WACOM_REPORT_INTUOSPAD		12
#define WACOM_REPORT_TPC1FG		6
#define WACOM_REPORT_TPC2FG		13
#define WACOM_REPORT_TPCHID		15
#define WACOM_REPORT_TPCST		16

/* device quirks */
#define WACOM_QUIRK_MULTI_INPUT		0x0001