@@ -7,6 +7,13 @@ Required properties:
- wakeup-gpios: the gpio pin to be used for waking up the controller
and also used as irq pin
+Optional properties:
+- eeti,protocol-version: protocol version used by the controller
+ 0: This is the default protocol used when the property is absent. This
+ protocol supports up to 5 touch points with 1 points per report.
+ 1: Protocol supports up to 10 touch points with a maximum of 5 points
+ per report.
+
Example:
touchscreen@4 {
@@ -15,4 +22,5 @@ Example:
interrupt-parent = <&gpio1>;
interrupts = <9 2>;
wakeup-gpios = <&gpio1 9 0>;
+ eeti,protocol-version = <1>;
};
@@ -58,6 +58,7 @@
struct egalax_ts {
struct i2c_client *client;
struct input_dev *input_dev;
+ int protocol_version;
struct touchscreen_properties props;
};
@@ -195,6 +196,9 @@ static int egalax_ts_probe(struct i2c_client *client,
return error;
}
+ of_property_read_u32(client->dev.of_node, "eeti,protocol-version",
+ &ts->protocol_version);
+
input_dev->name = "EETI eGalax Touch Screen";
input_dev->id.bustype = BUS_I2C;
EETI changed the i2c protocol in an incompatible way at some point. The documentation doesn't state if there is a way to autodetect the used protocol. Thus we introduce a DT property to let the driver know about the protocol version used by the touch controller. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> --- .../devicetree/bindings/input/touchscreen/egalax-ts.txt | 8 ++++++++ drivers/input/touchscreen/egalax_ts.c | 4 ++++ 2 files changed, 12 insertions(+)