* [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip
@ 2022-09-02 8:32 Yunlong Jia
2022-09-02 8:32 ` [PATCH 2/2] " Yunlong Jia
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Yunlong Jia @ 2022-09-02 8:32 UTC (permalink / raw)
To: LKML
Cc: Bob Moragues, Douglas Anderson, Henry Sun, Yunlong Jia,
David Heidelberg, Dmitry Torokhov, Rob Herring, devicetree,
linux-input
Add an elan touch screen chip eth3915n.
This chip requires more delay time than the eth3500.
Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
---
.../devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
index a9b53c2e6f0ab..d28625372f5ac 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
@@ -17,6 +17,7 @@ properties:
enum:
- elan,ektf3624
- elan,ekth3500
+ - elan,ekth3915
reg:
maxItems: 1
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] input: touchscreen: elants_i2c: Add eth3915n touchscreen chip
2022-09-02 8:32 [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Yunlong Jia
@ 2022-09-02 8:32 ` Yunlong Jia
2022-09-06 22:28 ` Doug Anderson
2022-09-06 22:29 ` [PATCH 1/2] dt-bindings: " Doug Anderson
2022-09-06 23:06 ` Dmitry Torokhov
2 siblings, 1 reply; 5+ messages in thread
From: Yunlong Jia @ 2022-09-02 8:32 UTC (permalink / raw)
To: LKML
Cc: Bob Moragues, Douglas Anderson, Henry Sun, Yunlong Jia,
Dmitry Torokhov, Greg Kroah-Hartman, Guenter Roeck,
Johnny Chuang, linux-input
The eth3915n requires more delay time than the eth3500 when reset.
Define EKTH3915_RESET_DELAY_MSEC as the reset delay time of eth3915n,
about 300ms.
Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
---
drivers/input/touchscreen/elants_i2c.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index c9dd703b0c7d8..60ddb58281bdf 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -116,6 +116,7 @@
#define ELAN_POWERON_DELAY_USEC 500
#define ELAN_RESET_DELAY_MSEC 20
+#define EKTH3915_RESET_DELAY_MSEC 300
/* FW boot code version */
#define BC_VER_H_BYTE_FOR_EKTH3900x1_I2C 0x72
@@ -133,6 +134,7 @@
enum elants_chip_id {
EKTH3500,
EKTF3624,
+ EKTH3915,
};
enum elants_state {
@@ -664,6 +666,7 @@ static int elants_i2c_initialize(struct elants_data *ts)
switch (ts->chip_id) {
case EKTH3500:
+ case EKTH3915:
if (!error)
error = elants_i2c_query_ts_info_ekth(ts);
break;
@@ -1361,7 +1364,17 @@ static int elants_i2c_power_on(struct elants_data *ts)
if (error)
return error;
- msleep(ELAN_RESET_DELAY_MSEC);
+ if (ts->chip_id == EKTH3915)
+ /*
+ * There need delay 300ms for power on sequence.
+ * T1 + T2 + T3 >= 305 ms
+ * T1: 0<time<500us
+ * T2: >5ms
+ * T3: >300ms
+ */
+ msleep(EKTH3915_RESET_DELAY_MSEC);
+ else
+ msleep(ELAN_RESET_DELAY_MSEC);
return 0;
}
@@ -1686,6 +1699,7 @@ static const struct i2c_device_id elants_i2c_id[] = {
{ DEVICE_NAME, EKTH3500 },
{ "ekth3500", EKTH3500 },
{ "ektf3624", EKTF3624 },
+ { "ekth3915", EKTH3915 },
{ }
};
MODULE_DEVICE_TABLE(i2c, elants_i2c_id);
@@ -1702,6 +1716,7 @@ MODULE_DEVICE_TABLE(acpi, elants_acpi_id);
static const struct of_device_id elants_of_match[] = {
{ .compatible = "elan,ekth3500", .data = (void *)EKTH3500 },
{ .compatible = "elan,ektf3624", .data = (void *)EKTF3624 },
+ { .compatible = "elan,ekth3915", .data = (void *)EKTH3915 },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, elants_of_match);
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] input: touchscreen: elants_i2c: Add eth3915n touchscreen chip
2022-09-02 8:32 ` [PATCH 2/2] " Yunlong Jia
@ 2022-09-06 22:28 ` Doug Anderson
0 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2022-09-06 22:28 UTC (permalink / raw)
To: Yunlong Jia
Cc: LKML, Bob Moragues, Henry Sun, Dmitry Torokhov,
Greg Kroah-Hartman, Guenter Roeck, Johnny Chuang,
open list:HID CORE LAYER
Hi,
On Fri, Sep 2, 2022 at 1:33 AM Yunlong Jia
<yunlong.jia@ecs.corp-partner.google.com> wrote:
>
> The eth3915n requires more delay time than the eth3500 when reset.
> Define EKTH3915_RESET_DELAY_MSEC as the reset delay time of eth3915n,
> about 300ms.
>
> Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
>
> ---
>
> drivers/input/touchscreen/elants_i2c.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
> index c9dd703b0c7d8..60ddb58281bdf 100644
> --- a/drivers/input/touchscreen/elants_i2c.c
> +++ b/drivers/input/touchscreen/elants_i2c.c
> @@ -116,6 +116,7 @@
>
> #define ELAN_POWERON_DELAY_USEC 500
> #define ELAN_RESET_DELAY_MSEC 20
> +#define EKTH3915_RESET_DELAY_MSEC 300
>
> /* FW boot code version */
> #define BC_VER_H_BYTE_FOR_EKTH3900x1_I2C 0x72
> @@ -133,6 +134,7 @@
> enum elants_chip_id {
> EKTH3500,
> EKTF3624,
> + EKTH3915,
> };
>
> enum elants_state {
> @@ -664,6 +666,7 @@ static int elants_i2c_initialize(struct elants_data *ts)
>
> switch (ts->chip_id) {
> case EKTH3500:
> + case EKTH3915:
> if (!error)
> error = elants_i2c_query_ts_info_ekth(ts);
> break;
> @@ -1361,7 +1364,17 @@ static int elants_i2c_power_on(struct elants_data *ts)
> if (error)
> return error;
>
> - msleep(ELAN_RESET_DELAY_MSEC);
> + if (ts->chip_id == EKTH3915)
> + /*
> + * There need delay 300ms for power on sequence.
> + * T1 + T2 + T3 >= 305 ms
> + * T1: 0<time<500us
> + * T2: >5ms
> + * T3: >300ms
> + */
> + msleep(EKTH3915_RESET_DELAY_MSEC);
> + else
> + msleep(ELAN_RESET_DELAY_MSEC);
>
> return 0;
> }
> @@ -1686,6 +1699,7 @@ static const struct i2c_device_id elants_i2c_id[] = {
> { DEVICE_NAME, EKTH3500 },
> { "ekth3500", EKTH3500 },
> { "ektf3624", EKTF3624 },
> + { "ekth3915", EKTH3915 },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, elants_i2c_id);
> @@ -1702,6 +1716,7 @@ MODULE_DEVICE_TABLE(acpi, elants_acpi_id);
> static const struct of_device_id elants_of_match[] = {
> { .compatible = "elan,ekth3500", .data = (void *)EKTH3500 },
> { .compatible = "elan,ektf3624", .data = (void *)EKTF3624 },
> + { .compatible = "elan,ekth3915", .data = (void *)EKTH3915 },
Adding giant delays isn't my favorite, but it seems like the trend in
touchscreens is that newer ones take forever to power up. I guess this
is no exception. FWIW:
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip
2022-09-02 8:32 [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Yunlong Jia
2022-09-02 8:32 ` [PATCH 2/2] " Yunlong Jia
@ 2022-09-06 22:29 ` Doug Anderson
2022-09-06 23:06 ` Dmitry Torokhov
2 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2022-09-06 22:29 UTC (permalink / raw)
To: Yunlong Jia
Cc: LKML, Bob Moragues, Henry Sun, David Heidelberg, Dmitry Torokhov,
Rob Herring,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:HID CORE LAYER
Hi,
On Fri, Sep 2, 2022 at 1:32 AM Yunlong Jia
<yunlong.jia@ecs.corp-partner.google.com> wrote:
>
> Add an elan touch screen chip eth3915n.
> This chip requires more delay time than the eth3500.
>
> Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
> ---
>
> .../devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
> index a9b53c2e6f0ab..d28625372f5ac 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
> @@ -17,6 +17,7 @@ properties:
> enum:
> - elan,ektf3624
> - elan,ekth3500
> + - elan,ekth3915
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip
2022-09-02 8:32 [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Yunlong Jia
2022-09-02 8:32 ` [PATCH 2/2] " Yunlong Jia
2022-09-06 22:29 ` [PATCH 1/2] dt-bindings: " Doug Anderson
@ 2022-09-06 23:06 ` Dmitry Torokhov
2 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2022-09-06 23:06 UTC (permalink / raw)
To: Yunlong Jia
Cc: LKML, Bob Moragues, Douglas Anderson, Henry Sun,
David Heidelberg, Rob Herring, devicetree, linux-input
On Fri, Sep 02, 2022 at 08:32:35AM +0000, Yunlong Jia wrote:
> Add an elan touch screen chip eth3915n.
> This chip requires more delay time than the eth3500.
>
> Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
Do you have company email (instead of Google partner domain account) by
chance?
> ---
>
> .../devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
> index a9b53c2e6f0ab..d28625372f5ac 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
> +++ b/Documentation/devicetree/bindings/input/touchscreen/elan,elants_i2c.yaml
> @@ -17,6 +17,7 @@ properties:
> enum:
> - elan,ektf3624
> - elan,ekth3500
> + - elan,ekth3915
>
> reg:
> maxItems: 1
> --
> 2.17.1
>
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-06 23:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 8:32 [PATCH 1/2] dt-bindings: input: touchscreen: elants_i2c: Add eth3915n touchscreen chip Yunlong Jia
2022-09-02 8:32 ` [PATCH 2/2] " Yunlong Jia
2022-09-06 22:28 ` Doug Anderson
2022-09-06 22:29 ` [PATCH 1/2] dt-bindings: " Doug Anderson
2022-09-06 23:06 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.