Skip to contentSkip to conversation

HID: rmi: fix PDT table garbling on Dell 9Q33

PATCH New Jake Merdich 1 participant 1 message Apr 23, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: rmi: fix PDT table garbling on Dell 9Q33

Dell 9Q33's touchpad has been getting invalid function addresses during the late stages of probing. This only occurs after the PDT was scanned multiple times, so it only popped up now that PDT scanning was unified in 0b2c7a89 (previously, hid-rmi.c scanned it only once).

This slows down probing enough to always get good data, at the cost of ~1ms of sleep per function probe (value determined empirically), or about 20ms total when enumerating. If someone has a better idea of handling this (maybe caching the PDT's?), I'd be happy to test.

---
 drivers/input/rmi4/rmi_driver.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/input/rmi4/rmi_driver.c +3 -0
index d64fc92858f2..8724ee241ee5 100644
@@ -545,6 +545,9 @@ static int rmi_scan_pdt_page(struct rmi_device *rmi_dev,
 		retval = callback(rmi_dev, ctx, &pdt_entry);
 		if (retval != RMI_SCAN_CONTINUE)
 			return retval;
+
+		// Dell 9Q33 garbles data if scanned too quickly
+		usleep_range(500, 1000);
 	}
 
 	/*
Signature · 1 line
2.12.2