Thread (1 message) 1 message, 1 author, 2010-06-29

Re: [PATCH v2] input: qt602240 - Add ATMEL QT602240 touchscreen driver

From: Joonyoung Shim <hidden>
Date: 2010-06-29 03:33:38

Hi,

On 6/28/2010 11:26 PM, Dan Murphy wrote:
I don't see any error handling from the IC here.

Generally this IC should give a few error messages if a X/Y line is broken,
the chip goes into reset, or the chip is missed configured.
The configuration error can occur and if the chip detect it, we get
messages from message object in interrupt handler and can see it. If 
needs, i can add error print.
This is a bad situation here
+       /* Read dummy message to make high CHG pin */
+       do {
+               ret = qt602240_read_object(data, QT602240_GEN_MESSAGE, 0);
+               if (ret < 0)
+                       return ret;
+       } while (ret != 0xff);

The chip may have an error and constantly send you the message which means
you will never get out of this loop.  This can be bad as your probe or
load_fw may never return.
Hmm, this chip reports always 0xff value if the message is nothing, but
i will add count to prevent unlikely loop.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help