Skip to contentSkip to conversation

Input: elants_i2c - Report resolution information for touch major

PATCH Applied Johnny Chuang 6 participants 8 messages Feb 27, 2020 – Mar 6, 2020

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

PATCH 1/1 Input: elants_i2c - Report resolution information for touch major

From: Johnny Chuang <[email protected]>

This patch supports reporting resolution for ABS_MT_TOUCH_MAJOR event. This information is needed in showing pressure/width radius.

---
 drivers/input/touchscreen/elants_i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/touchscreen/elants_i2c.c +1 -0
index 4911799..14c577c 100644
@@ -1309,6 +1309,7 @@ static int elants_i2c_probe(struct i2c_client *client,
 	input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+	input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);
 
 	error = input_register_device(ts->input);
 	if (error) {
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#2 lore raw
In reply to Johnny Chuang
Quoted 15 lines · Johnny Chuang

From: Johnny Chuang <[email protected]>

This patch supports reporting resolution for ABS_MT_TOUCH_MAJOR event. This information is needed in showing pressure/width radius.

---
 drivers/input/touchscreen/elants_i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/touchscreen/elants_i2c.c +0 -0
index 4911799..14c577c 100644

drivers/input/touchscreen/elants_i2c.c static int elants_i2c_probe(struct i2c_client *client, · line 1312

Quoted 4 lines
drivers/input/touchscreen/elants_i2c.c +1 -0
@@ -1309,6 +1309,7 @@ static int elants_i2c_probe(struct i2c_client *client,
 	input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+	input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);

official resolution for absinfo is "units per mm", so a value of 3 would mean 3mm, is that correct?

Not that it matters too much, since touch major is already all over the place and needs userspace overrides for every device but it'd be nice to at least make this useful out of the box on one device class.

otherwise

Cheers,
Peter

Quoted 6 lines
drivers/input/touchscreen/elants_i2c.c +0 -0
 	error = input_register_device(ts->input);
 	if (error) {
Signature · 1 line
2.7.4
#3 lore raw
Quoted 6 lines

-----Original Message-----
From: Peter Hutterer [mailto:[email protected]]
Sent: Friday, February 28, 2020 6:36 AM
To: Johnny Chuang
Cc: Dmitry Torokhov; Benjamin Tissoires; [email protected]; [email protected]; Johnny Chuang; Jennifer Tsai; James Chen;

Paul

Quoted 2 lines

Liang; Jeff Chuang
Subject: Re: [PATCH] Input: elants_i2c - Report resolution information for

touch

Quoted 20 lines

major

Review

Quoted 11 lines · Johnny Chuang

From: Johnny Chuang <[email protected]>

This patch supports reporting resolution for ABS_MT_TOUCH_MAJOR event. This information is needed in showing pressure/width radius.

---
 drivers/input/touchscreen/elants_i2c.c | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/input/touchscreen/elants_i2c.c

drivers/input/touchscreen/elants_i2c.c static int elants_i2c_probe(struct i2c_client

Quoted 4 lines

index 4911799..14c577c 100644

drivers/input/touchscreen/elants_i2c.c +0 -0
@@ -1309,6 +1309,7 @@ static int elants_i2c_probe(struct i2c_client

*client,

Quoted 7 lines

drivers/input/touchscreen/elants_i2c.c static int elants_i2c_probe(struct i2c_client *client, · line 1312

Quoted 4 lines
drivers/input/touchscreen/elants_i2c.c +1 -0
 	input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+	input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);

official resolution for absinfo is "units per mm", so a value of 3 would mean 3mm, is that correct?

Correct.
This resolution (1 unit/mm) is for all elan I2C touchscreen devices, including the touchscreen devices in the future.
This information is from our firmware members.

Quoted 3 lines

Not that it matters too much, since touch major is already all over the place and needs userspace overrides for every device but it'd be nice to

at

Quoted 15 lines

least make this useful out of the box on one device class.

otherwise

Cheers,
Peter

Quoted 6 lines
drivers/input/touchscreen/elants_i2c.c +0 -1
 	error = input_register_device(ts->input);
 	if (error) {
--

2.7.4

#4 lore raw
In reply to Peter Hutterer
Quoted 37 lines
Quoted 10 lines

-----Original Message-----
From: Peter Hutterer [mailto:[email protected]]
Sent: Friday, February 28, 2020 6:36 AM
To: Johnny Chuang
Cc: Dmitry Torokhov; Benjamin Tissoires; [email protected]; [email protected]; Johnny Chuang; Jennifer Tsai; James Chen; Paul Liang; Jeff Chuang
Subject: Re: [PATCH] Input: elants_i2c - Report resolution information for touch major

Quoted 4 lines
Quoted 3 lines · Johnny Chuang

From: Johnny Chuang <[email protected]>

This patch supports reporting resolution for ABS_MT_TOUCH_MAJOR

event.

Quoted 14 lines

Review

Quoted 8 lines

This information is needed in showing pressure/width radius.

---
 drivers/input/touchscreen/elants_i2c.c | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/input/touchscreen/elants_i2c.c

drivers/input/touchscreen/elants_i2c.c static int elants_i2c_probe(struct i2c_client

Quoted 4 lines

index 4911799..14c577c 100644

drivers/input/touchscreen/elants_i2c.c +0 -0
@@ -1309,6 +1309,7 @@ static int elants_i2c_probe(struct i2c_client

*client,

Quoted 7 lines

drivers/input/touchscreen/elants_i2c.c static int elants_i2c_probe(struct i2c_client *client, · line 1312

Quoted 4 lines
drivers/input/touchscreen/elants_i2c.c +1 -0
 	input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+	input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);

official resolution for absinfo is "units per mm", so a value of 3 would mean 3mm, is that correct?

Quoted 2 lines

Correct.
This resolution (1 unit/mm) is for all elan I2C touchscreen devices,

including

Quoted 2 lines

the touchscreen devices in the future.
This information is from our firmware members.

Hi Peter / Benjamin,
Could you help to review and approve this patch?

Quoted 19 lines
Quoted 19 lines

Not that it matters too much, since touch major is already all over the place and needs userspace overrides for every device but it'd be nice to at least make this useful out of the box on one device class.

otherwise

Cheers,
Peter

Quoted 6 lines
drivers/input/touchscreen/elants_i2c.c +0 -1
 	error = input_register_device(ts->input);
 	if (error) {
--

2.7.4

#5 lore raw
In reply to Peter Hutterer
Quoted 24 lines
Quoted 24 lines
Quoted 10 lines

-----Original Message-----
From: Peter Hutterer [mailto:[email protected]]
Sent: Friday, February 28, 2020 6:36 AM
To: Johnny Chuang
Cc: Dmitry Torokhov; Benjamin Tissoires; [email protected]; [email protected]; Johnny Chuang; Jennifer Tsai; James Chen; Paul Liang; Jeff Chuang
Subject: Re: [PATCH] Input: elants_i2c - Report resolution information for touch major

Quoted 4 lines
Quoted 3 lines · Johnny Chuang

From: Johnny Chuang <[email protected]>

This patch supports reporting resolution for ABS_MT_TOUCH_MAJOR

event.

Quoted 9 lines

Review

Quoted 8 lines

This information is needed in showing pressure/width radius.

---
 drivers/input/touchscreen/elants_i2c.c | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/input/touchscreen/elants_i2c.c

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

index 4911799..14c577c 100644

drivers/input/touchscreen/elants_i2c.c +0 -0
@@ -1309,6 +1309,7 @@ static int elants_i2c_probe(struct

i2c_client

*client,

Quoted 1 line

input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0,

0);

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

drivers/input/touchscreen/elants_i2c.c static int elants_i2c_probe(struct i2c_client *client, · line 1312

Quoted 3 lines
drivers/input/touchscreen/elants_i2c.c +1 -0
 	input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+	input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);

official resolution for absinfo is "units per mm", so a value of 3 would mean 3mm, is that correct?

Quoted 8 lines
Quoted 4 lines

Correct.
This resolution (1 unit/mm) is for all elan I2C touchscreen devices, including the touchscreen devices in the future.
This information is from our firmware members.

Hi Peter / Benjamin,
Could you help to review and approve this patch?

Hi Peter / Benjamin,
HP project Mordin mass production on 2020/3/10. ODM needs to upgrade new image with this patch to verify.
Because ODM can not get the image link from Google, already delay verify schedule.
Please help to review and approve this patch ASAP. Thank you very much.

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines

Not that it matters too much, since touch major is already all over the place and needs userspace overrides for every device but it'd be nice to at least make this useful out of the box on one device class.

otherwise

Cheers,
Peter

Quoted 6 lines
drivers/input/touchscreen/elants_i2c.c +0 -1
 	error = input_register_device(ts->input);
 	if (error) {
--

2.7.4

Acked-by on v1 1/1
#6 lore raw
In reply to Johnny Chuang
Quoted 8 lines · Johnny Chuang

From: Johnny Chuang <[email protected]>

This patch supports reporting resolution for ABS_MT_TOUCH_MAJOR event. This information is needed in showing pressure/width radius.

---

Cheers,
Benjamin

Quoted 18 lines
 drivers/input/touchscreen/elants_i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/touchscreen/elants_i2c.c +1 -1
index 4911799..14c577c 100644
@@ -1309,6 +1309,7 @@ static int elants_i2c_probe(struct i2c_client *client,
        input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
        input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
        input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+       input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);
 
        error = input_register_device(ts->input);
        if (error) {
--

2.7.4

maintainer Applied
#7 lore raw
In reply to Johnny Chuang
Quoted 6 lines · Johnny Chuang

From: Johnny Chuang <[email protected]>

This patch supports reporting resolution for ABS_MT_TOUCH_MAJOR event. This information is needed in showing pressure/width radius.

Applied, thank you.

Quoted 19 lines
---
 drivers/input/touchscreen/elants_i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/input/touchscreen/elants_i2c.c +1 -0
index 4911799..14c577c 100644
@@ -1309,6 +1309,7 @@ static int elants_i2c_probe(struct i2c_client *client,
 	input_set_abs_params(ts->input, ABS_MT_PRESSURE, 0, 255, 0, 0);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->x_res);
 	input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
+	input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);
 
 	error = input_register_device(ts->input);
 	if (error) {
Signature · 1 line
2.7.4
Signature · 1 line
Dmitry