From d74ac6f60a7ef677c3b7702f103b670142f84d66 Mon Sep 17 00:00:00 2001 From: Zhengqiao Xia Date: Wed, 27 Dec 2023 16:50:12 +0800 Subject: [PATCH 1/2] dt-bindings: HID: i2c-hid: elan: Introduce Ilitek ili2901 The Ilitek ili2901 touch screen chip same as Elan eKTH6915 controller has a reset gpio. The difference is that they have different post_power_delay_ms and post_gpio_reset_on_delay_ms. Ilitek ili2901 also uses 3.3V power supply. Signed-off-by: Zhengqiao Xia Acked-by: Krzysztof Kozlowski Signed-off-by: Jiri Kosina --- Documentation/devicetree/bindings/input/elan,ekth6915.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml index 3e2d216c6432..dc4ac41f2441 100644 --- a/Documentation/devicetree/bindings/input/elan,ekth6915.yaml +++ b/Documentation/devicetree/bindings/input/elan,ekth6915.yaml @@ -18,8 +18,9 @@ allOf: properties: compatible: - items: - - const: elan,ekth6915 + enum: + - elan,ekth6915 + - ilitek,ili2901 reg: const: 0x10 From 03ddb7de012c68d727509c4f6e0c0fa1ebc81668 Mon Sep 17 00:00:00 2001 From: Zhengqiao Xia Date: Wed, 27 Dec 2023 16:50:13 +0800 Subject: [PATCH 2/2] HID: i2c-hid: elan: Add ili2901 timing ILI2901 requires reset to pull down time greater than 10ms, so the configuration post_power_delay_ms is 10, and the chipset initial time is required to be greater than 100ms, so the post_gpio_reset_on_delay_ms is set to 100. Reviewed-by: Linus Walleij Signed-off-by: Zhengqiao Xia Signed-off-by: Jiri Kosina --- drivers/hid/i2c-hid/i2c-hid-of-elan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/hid/i2c-hid/i2c-hid-of-elan.c b/drivers/hid/i2c-hid/i2c-hid-of-elan.c index 31abab57ad44..5b91fb106cfc 100644 --- a/drivers/hid/i2c-hid/i2c-hid-of-elan.c +++ b/drivers/hid/i2c-hid/i2c-hid-of-elan.c @@ -130,9 +130,17 @@ static const struct elan_i2c_hid_chip_data ilitek_ili9882t_chip_data = { .main_supply_name = NULL, }; +static const struct elan_i2c_hid_chip_data ilitek_ili2901_chip_data = { + .post_power_delay_ms = 10, + .post_gpio_reset_on_delay_ms = 100, + .hid_descriptor_address = 0x0001, + .main_supply_name = "vcc33", +}; + static const struct of_device_id elan_i2c_hid_of_match[] = { { .compatible = "elan,ekth6915", .data = &elan_ekth6915_chip_data }, { .compatible = "ilitek,ili9882t", .data = &ilitek_ili9882t_chip_data }, + { .compatible = "ilitek,ili2901", .data = &ilitek_ili2901_chip_data }, { } }; MODULE_DEVICE_TABLE(of, elan_i2c_hid_of_match);