- input-tsc-10-dm-usb-touchscreen-driver-assumes-2-byte-response-from-controller.patch removed from -mm tree

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

 



The patch titled
     input: TSC-10 DM USB touchscreen driver assumes 2-byte response from controller
has been removed from the -mm tree.  Its filename was
     input-tsc-10-dm-usb-touchscreen-driver-assumes-2-byte-response-from-controller.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: input: TSC-10 DM USB touchscreen driver assumes 2-byte response from controller
From: "Nuno Lucas" <ntlucas@xxxxxxxxx>

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 on the bugzilla
tracker, but rebased to version 2.6.27.4 and with unnecessary comments and
printk's removed.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11961

Signed-off-by: Nuno Lucas <ntlucas@xxxxxxxxx>
Cc: Dmitry Torokhov <dtor@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/input/touchscreen/usbtouchscreen.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff -puN drivers/input/touchscreen/usbtouchscreen.c~input-tsc-10-dm-usb-touchscreen-driver-assumes-2-byte-response-from-controller drivers/input/touchscreen/usbtouchscreen.c
--- a/drivers/input/touchscreen/usbtouchscreen.c~input-tsc-10-dm-usb-touchscreen-driver-assumes-2-byte-response-from-controller
+++ a/drivers/input/touchscreen/usbtouchscreen.c
@@ -424,7 +424,7 @@ static int dmc_tsc10_init(struct usbtouc
 	                      0, 0, buf, 2, USB_CTRL_SET_TIMEOUT);
 	if (ret < 0)
 		goto err_out;
-	if (buf[0] != 0x06 || buf[1] != 0x00) {
+	if (buf[0] != 0x06) {
 		ret = -ENODEV;
 		goto err_out;
 	}
@@ -437,8 +437,7 @@ static int dmc_tsc10_init(struct usbtouc
 	                      TSC10_RATE_150, 0, buf, 2, USB_CTRL_SET_TIMEOUT);
 	if (ret < 0)
 		goto err_out;
-	if ((buf[0] != 0x06 || buf[1] != 0x00) &&
-	    (buf[0] != 0x15 || buf[1] != 0x01)) {
+	if ((buf[0] != 0x06) && (buf[0] != 0x15 || buf[1] != 0x01)) {
 		ret = -ENODEV;
 		goto err_out;
 	}
_

Patches currently in -mm which might be from ntlucas@xxxxxxxxx are

linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux