On Tuesday 08 November 2016 10:16:21 Paul Donohue wrote: > For consistency and clarity, the input_report_*() functions should > be called by alps_process_packet_ss4_v2() instead of by > alps_decode_ss4_v2(). > > Signed-off-by: Paul Donohue <linux-kernel@xxxxxxxxxx> > > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c > index b93fe83..12376d2 100644 > --- a/drivers/input/mouse/alps.c > +++ b/drivers/input/mouse/alps.c > @@ -1267,18 +1267,11 @@ static int alps_decode_ss4_v2(struct alps_fields *f, > break; > > case SS4_PACKET_ID_STICK: > - if (!(priv->flags & ALPS_DUALPOINT)) { > - psmouse_warn(psmouse, > - "Rejected trackstick packet from non DualPoint device"); > - } else { > - int x = (s8)(((p[0] & 1) << 7) | (p[1] & 0x7f)); > - int y = (s8)(((p[3] & 1) << 7) | (p[2] & 0x7f)); > - int pressure = (s8)(p[4] & 0x7f); > - > - input_report_rel(priv->dev2, REL_X, x); > - input_report_rel(priv->dev2, REL_Y, -y); > - input_report_abs(priv->dev2, ABS_PRESSURE, pressure); > - } > + f->st.x = (s8)(((p[0] & 1) << 7) | (p[1] & 0x7f)); > + f->st.y = -(s8)(((p[3] & 1) << 7) | (p[2] & 0x7f)); > + f->pressure = (s8)(p[4] & 0x7f); This is not correct. Those fields values are used for single touch events from touchpad -- not from trackstick. Btw, you have access to packet also in process functions, so you can extract x, y and pressure in process function too. -- Pali Rohár pali.rohar@xxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html