Re: [PATCH v4 2/3] Input: ALPS - Clean up TrackStick handling for SS5 hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 09, 2016 at 01:14:43PM +0100, Pali Rohár wrote:
> On Tuesday 08 November 2016 10:16:21 Paul Donohue wrote:
> > --- 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,
> >  	case SS4_PACKET_ID_STICK:
> > +		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.

I was trying to keep all of the decoding logic in alps_decode_ss4_v2().
And since there aren't any fields specifically for the trackstick in
alps_fields, I figured the single touch fields would be an appropriate
place to stash those coordinates.

But if you would prefer to move some of the trackstick decoding logic to
alps_process_packet_ss4_v2(), I can do that.
--
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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux