Skip to contentSkip to conversation

Input: goodix - do not explicitly set evbits in input device

PATCH In review Dmitry Torokhov 3 participants 4 messages Jun 9, 2015 – Jun 10, 2015

Subsystems (3)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: goodix - do not explicitly set evbits in input device

input_mt_init_slots() will do that for us.

---
 drivers/input/touchscreen/goodix.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/input/touchscreen/goodix.c +0 -4
index 73ade35..b4d12e2 100644
@@ -301,10 +301,6 @@ static int goodix_request_input_dev(struct goodix_ts_data *ts, u16 version,
 		return -ENOMEM;
 	}
 
-	ts->input_dev->evbit[0] = BIT_MASK(EV_SYN) |
-				  BIT_MASK(EV_KEY) |
-				  BIT_MASK(EV_ABS);
-
 	input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X,
 			     0, ts->abs_x_max, 0, 0);
 	input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y,
Signature · 5 lines
2.2.0.rc0.207.ga3a616c


-- 
Dmitry
#1 lore raw
Quoted 1 line · Dmitry Torokhov

input_mt_init_slots() will do that for us.

I'm guessing you know what you're doing here, but I couldn't find where the EV_SYN bit would have been set in the input_mt_init_slots() call chain.

Quoted 26 lines
---
 drivers/input/touchscreen/goodix.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/input/touchscreen/goodix.c +0 -4
index 73ade35..b4d12e2 100644
@@ -301,10 +301,6 @@ static int goodix_request_input_dev(struct 
 goodix_ts_data *ts, u16 version,
              return -ENOMEM;
      }
 
-     ts->input_dev->evbit[0] = BIT_MASK(EV_SYN) |
-                               BIT_MASK(EV_KEY) |
-                               BIT_MASK(EV_ABS);
-
      input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X,
                           0, ts->abs_x_max, 0, 0);
      input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y,
Signature · 1 line
2.2.0.rc0.207.ga3a616c
Reviewed-by
#2 lore raw
Quoted 6 lines · Bastien Nocera
Quoted 1 line · Dmitry Torokhov

input_mt_init_slots() will do that for us.

I'm guessing you know what you're doing here, but I couldn't find where the EV_SYN bit would have been set in the input_mt_init_slots() call chain.

input_register_device() sets EV_SYN bit for us (it is a mandatory field for input).

Quoted 16 lines
Quoted 16 lines
---
 drivers/input/touchscreen/goodix.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/input/touchscreen/goodix.c +0 -0
index 73ade35..b4d12e2 100644
@@ -301,10 +301,6 @@ static int goodix_request_input_dev(struct 
 goodix_ts_data *ts, u16 version,
              return -ENOMEM;
      }
 
Quoted 4 lines

drivers/input/touchscreen/goodix.c static int goodix_request_input_dev(struct goodix_ts_data *ts, u16 version, · line 307

Quoted 4 lines
drivers/input/touchscreen/goodix.c +0 -4
-     ts->input_dev->evbit[0] = BIT_MASK(EV_SYN) |
-                               BIT_MASK(EV_KEY) |
-                               BIT_MASK(EV_ABS);
-

Cheers,
Benjamin

Quoted 7 lines
Quoted 7 lines
drivers/input/touchscreen/goodix.c +0 -0
      input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X,
                           0, ts->abs_x_max, 0, 0);
      input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y,
Signature · 1 line
2.2.0.rc0.207.ga3a616c
#3 lore raw
Quoted 13 lines · Benjamin Tissoires
Quoted 8 lines · Bastien Nocera
Quoted 1 line · Dmitry Torokhov

input_mt_init_slots() will do that for us.

I'm guessing you know what you're doing here, but I couldn't find where
the EV_SYN bit would have been set in the input_mt_init_slots() call
chain.

input_register_device() sets EV_SYN bit for us (it is a mandatory field
for input).

<snip>

Quoted 2 lines

OK, thanks for the explanation.