]> bbs.cooldavid.org Git - net-next-2.6.git/commit
Staging: mrst-touchscreen - fix channel allocation
authorArjan van de Ven <arjan@linux.intel.com>
Wed, 1 Sep 2010 05:57:31 +0000 (22:57 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 2 Sep 2010 02:43:22 +0000 (19:43 -0700)
commit409d568dc5f0dd179b5343630b65fdf082c14069
tree65b99cad2ee4e4fb6cb96e0e689a3d4c2f69d779
parent36466a1b4585f9a24d5920ff90aa73e3803745cd
Staging: mrst-touchscreen - fix channel allocation

The touch screen driver tries to find a range of free channels (which
are an array of bytes), by scanning for the "end of used channel" marker.
However it tries to be WAAAAY too smart and does 32 bit logic on 8 bit
quantities, and in the process completely gets it wrong
(repeatedly read the same register instead of incrementing in the loop,
assuming that if any of the 4 bytes in the 32 byte quantity is free,
all four are free, returning the channel number divided by 4 rather than
the actual first free channel number)

On the setting side, the same mistakes are made by and large; changed
this to just use the byte SCU write functions....

With these fixes we go from a completely non detected touchscreen to
something that appears to completely get detected.
(after also fixing the ordering issue that Jacobs patch should solve)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/staging/mrst-touchscreen/intel-mid-touch.c