kernel_optimize_test/drivers/input
Nuno Lucas 2ec6f246c3 Input: usbtouchscreen - fix TSC-10 DM USB controllers without EEPROM
The usbtouchscreen module implements a driver for the TSC-10 DM USB
touchscreen controllers, but assumes a 2-byte response for the
CMD_RESET and CMD_RATE commands, when they can be only a single byte
when no EEPROM is connected.

The driver worked with an earlier controller revision, but new
revisions of the controller fail.

It seems the problem is that the early controller had the
SEL4/EEPROM-CS pin high, but the new controller has it down, making
the response different.

Without the fix, the controller would answer the single byte 0x06
(ACK), making the init fail with -ENODEV because buf[1] is 0xFF (as
initialized before).

As the single byte is the only thing we need to check it was ok, there
is no need to verify the second byte.

The [0x15 0x01] case is the NAK [0x15] response for when there is no
data in the EEPROM [bit-0 of second byte set], so I let that be, as I
don't have any controller with an EEPROM.

With this patch, both the earlier and latest controller work the same.

Note: This was previously submited as BUG #11961 [1] on the bugzilla
tracker, but rebased to version 2.6.27.4 and with unnecessary comments
and printk's removed.

[1] http://bugzilla.kernel.org/show_bug.cgi?id=11961

Signed-off-by: Nuno Lucas <ntlucas@gmail.com>
Acked-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-11-19 16:53:58 -05:00
..
gameport Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
joystick USB: remove info() macro from usb input drivers 2008-10-17 14:41:10 -07:00
keyboard Input: omap-keypad - allow more than 6 rows 2008-10-29 00:28:58 -04:00
misc Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
mouse Input: appletouch - driver refactoring 2008-10-29 00:28:30 -04:00
serio Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
tablet USB: remove info() macro from usb input drivers 2008-10-17 14:41:10 -07:00
touchscreen Input: usbtouchscreen - fix TSC-10 DM USB controllers without EEPROM 2008-11-19 16:53:58 -05:00
apm-power.c Input: apm-power - fix crash when unloading modules 2008-03-24 11:02:06 -04:00
evbug.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
evdev.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
ff-core.c drivers/input/ff-core.c needs <linux/sched.h> 2008-07-02 18:40:08 -07:00
ff-memless.c Input: use clamp_val() macro in ff-memless.c 2008-05-16 14:49:47 -04:00
fixp-arith.h changed email 2007-10-20 00:47:32 +02:00
input-compat.c Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
input-compat.h Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
input-polldev.c Input: remove private member from input_dev structure 2008-04-02 00:41:00 -04:00
input.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
joydev.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
Kconfig xen pvfb: Para-virtual framebuffer, keyboard and pointer driver 2008-04-24 23:57:33 +02:00
Makefile Input: refactor evdev 32bit compat to be shareable with uinput 2008-10-27 22:03:42 -04:00
mousedev.c Input: struct device - replace bus_id with dev_name(), dev_set_name() 2008-10-30 09:29:05 -04:00
xen-kbdfront.c xen: clean up domain mode predicates 2008-08-20 12:40:07 +02:00