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

Re: [PATCH 6/6 V4] input: STMPE touch controller support

From: Luotao Fu <hidden>
Date: 2010-06-24 13:11:46
Also in: lkml

Possibly related (same subject, not in this thread)

On Thu, Jun 24, 2010 at 06:31:09PM +0530, Rabin VINCENT wrote:
On Thu, Jun 24, 2010 at 14:42:10 +0200, Luotao Fu wrote:
quoted
On Thu, Jun 24, 2010 at 06:01:53PM +0530, Rabin VINCENT wrote:
quoted
On Thu, Jun 24, 2010 at 13:13:41 +0200, Luotao Fu wrote:
quoted
+       ret = stmpe_set_bits(stmpe, STMPE_REG_TSC_FRACTION_Z,
+                       FRACTION_Z(ts->fraction_z),
+                       FRACTION_Z(ts->fraction_z));
I think your earlier revisions had this same behaviour, but this only
writes the bits you are trying to set, and it may be a problem if there
are other bits already set in this field.  I don't know if this is a
concern with this block, but if it is, you can do something like the
following to clear out the field before writing:
This is done intentionally to leave the bits alone which I don't want.
Most of the registers here are used exclusively for the touchscreen.
Some others are shared with the ADC. The ADC however doesn't have any
own configuration and has to go with the configuration of the touch
screen. Hence it's OK, even probably better not to touch the bits we
don't need.
I meant something like: let's say you want to change the "count of the
fractional part" (I quote from your platdata).  It (the FRACTION_Z
field, I assume) has a default value of (say) 2.  Say you want to change
the count to 1.  The above write will change it to 3 instead.  If this
is really the behaviour you need, it should be OK then.
hmm, good catch. I didn't think about this. Actually nobody else should
touch these registers and they are only written while doing probe,
directly after the chip get resetted. However, it is still theoretically
troublesome, if one of them get written previously by accident. I'll
fix it. Thanks for the catch.

cheers
Luotao Fu
-- 
Pengutronix e.K.                           | Dipl.-Ing. Luotao Fu        |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Attachments

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