diff mbox series

[v2,3/9] input: elants: remove unused axes

Message ID fba33fca7c1e8a21cc1dc9e9aca975e871468e22.1576079249.git.mirq-linux@rere.qmqm.pl (mailing list archive)
State New, archived
Headers show
Series input: elants: Support Asus TF300T touchscreen | expand

Commit Message

Michał Mirosław Dec. 11, 2019, 4:03 p.m. UTC
Driver only ever reports MT events. Clear capabilities of all others.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/input/touchscreen/elants_i2c.c | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Dmitry Osipenko Dec. 12, 2019, 12:34 a.m. UTC | #1
11.12.2019 19:03, Michał Mirosław пишет:
> Driver only ever reports MT events. Clear capabilities of all others.
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/input/touchscreen/elants_i2c.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
> index eadd26d5a06f..ab9d63239ff5 100644
> --- a/drivers/input/touchscreen/elants_i2c.c
> +++ b/drivers/input/touchscreen/elants_i2c.c
> @@ -1251,17 +1251,6 @@ static int elants_i2c_probe(struct i2c_client *client,
>  	ts->input->name = "Elan Touchscreen";
>  	ts->input->id.bustype = BUS_I2C;
>  
> -	__set_bit(BTN_TOUCH, ts->input->keybit);
> -	__set_bit(EV_ABS, ts->input->evbit);
> -	__set_bit(EV_KEY, ts->input->evbit);
> -
> -	/* Single touch input params setup */
> -	input_set_abs_params(ts->input, ABS_X, 0, ts->x_max, 0, 0);
> -	input_set_abs_params(ts->input, ABS_Y, 0, ts->y_max, 0, 0);
> -	input_set_abs_params(ts->input, ABS_PRESSURE, 0, 255, 0, 0);
> -	input_abs_set_res(ts->input, ABS_X, ts->x_res);
> -	input_abs_set_res(ts->input, ABS_Y, ts->y_res);
> -
>  	/* Multitouch input params setup */
>  	error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM,
>  				    INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);
> 

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index eadd26d5a06f..ab9d63239ff5 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -1251,17 +1251,6 @@  static int elants_i2c_probe(struct i2c_client *client,
 	ts->input->name = "Elan Touchscreen";
 	ts->input->id.bustype = BUS_I2C;
 
-	__set_bit(BTN_TOUCH, ts->input->keybit);
-	__set_bit(EV_ABS, ts->input->evbit);
-	__set_bit(EV_KEY, ts->input->evbit);
-
-	/* Single touch input params setup */
-	input_set_abs_params(ts->input, ABS_X, 0, ts->x_max, 0, 0);
-	input_set_abs_params(ts->input, ABS_Y, 0, ts->y_max, 0, 0);
-	input_set_abs_params(ts->input, ABS_PRESSURE, 0, 255, 0, 0);
-	input_abs_set_res(ts->input, ABS_X, ts->x_res);
-	input_abs_set_res(ts->input, ABS_Y, ts->y_res);
-
 	/* Multitouch input params setup */
 	error = input_mt_init_slots(ts->input, MAX_CONTACT_NUM,
 				    INPUT_MT_DIRECT | INPUT_MT_DROP_UNUSED);