Re: [PATCH] HID: Add support for pressure sensitive buttons

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

 



On Tue, Nov 15, 2011 at 03:27:42PM +0100, Jiri Kosina wrote:
> On Mon, 14 Nov 2011, Sean Young wrote:
> 
> >  	left = left * 0xff / 0xffff;
> >  	right = (right != 0); /* on/off only */
> >  
> > +	sjoyff->report->field[0]->value[0] = 1;
> >  	sjoyff->report->field[0]->value[1] = right;
> >  	sjoyff->report->field[0]->value[2] = left;
> 
> General comment to the whole patch applicable on many other places as 
> well: it'd be nice if you could stick a short comment to the places which 
> contain magic contants mandated by the device protocol, so that anyone 
> else looking at the driver gets at least a basic idea why are individial 
> fields initialized the way they are.

The constants are found by snooping what the windows driver does. I have 
no idea why the values are what they are; in the v2 version of my patch
I've attempted to document better what the device is supposed to do. Is
that what you're after?


Sean
--
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