<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/input/touchscreen/st1232.c, branch v5.15.208</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.208'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-11-18T18:17:01+00:00</updated>
<entry>
<title>Input: st1232 - increase "wait ready" timeout</title>
<updated>2021-11-18T18:17:01+00:00</updated>
<author>
<name>John Keeping</name>
<email>john@metanate.com</email>
</author>
<published>2021-10-06T18:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d36d2c35fd98259de4b4f44d877365369eb19534'/>
<id>urn:sha1:d36d2c35fd98259de4b4f44d877365369eb19534</id>
<content type='text'>
[ Upstream commit 2667f6b7af99e81958fa97c03bb519fcb09d0055 ]

I have a ST1633 touch controller which fails to probe due to a timeout
waiting for the controller to become ready.  Increasing the minimum
delay to 100ms ensures that the probe sequence completes successfully.

The ST1633 datasheet says nothing about the maximum delay here and the
ST1232 I2C protocol document says "wait until" with no notion of a
timeout.

Since this only runs once during probe, being generous with the timout
seems reasonable and most likely the device will become ready
eventually.

(It may be worth noting that I saw this issue with a PREEMPT_RT patched
kernel which probably has tighter wakeups from usleep_range() than other
preemption models.)

Fixes: f605be6a57b4 ("Input: st1232 - wait until device is ready before reading resolution")
Signed-off-by: John Keeping &lt;john@metanate.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/20210929152609.2421483-1-john@metanate.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - fix NORMAL vs. IDLE state handling</title>
<updated>2021-02-23T17:35:33+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-02-23T17:30:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1bff77f41a805b16b5355497c217656711601282'/>
<id>urn:sha1:1bff77f41a805b16b5355497c217656711601282</id>
<content type='text'>
NORMAL (0x0) and IDLE (0x4) are really two different states.  Hence you
cannot check for both using a bitmask, as that checks for IDLE only,
breaking operation for devices that are in NORMAL state.

Fix the wait function to report either state as ready.

Fixes: 6524d8eac258452e ("Input: st1232 - add IDLE state as ready condition")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Michael Tretter &lt;m.tretter@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210223090201.1430542-1-geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - add IDLE state as ready condition</title>
<updated>2021-02-19T19:03:44+00:00</updated>
<author>
<name>Michael Tretter</name>
<email>m.tretter@pengutronix.de</email>
</author>
<published>2021-02-19T18:37:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6524d8eac258452e547f8a49c8a965ac6dd8a161'/>
<id>urn:sha1:6524d8eac258452e547f8a49c8a965ac6dd8a161</id>
<content type='text'>
The st1232 can switch from NORMAL to IDLE state after the configured
idle time (by default 8 s). If the st1232 is not reset during probe, it
might already be ready but in IDLE state. Since it does not enter NORMAL
state in this case, probe fails.

Fix the wait function to report the IDLE state as ready, too.

Fixes: f605be6a57b4 ("Input: st1232 - wait until device is ready before reading resolution")
Signed-off-by: Michael Tretter &lt;m.tretter@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210219110556.1858969-1-m.tretter@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - wait until device is ready before reading resolution</title>
<updated>2021-01-02T06:19:03+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-01-02T06:15:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f605be6a57b439df7568a865c187b81863018c95'/>
<id>urn:sha1:f605be6a57b439df7568a865c187b81863018c95</id>
<content type='text'>
According to the st1232 datasheet, the host has to wait for the device
to change into Normal state before accessing registers other than the
Status Register.

If the reset GPIO is wired, the device is powered on during driver
probe, just before reading the resolution.  However, the latter may
happen before the device is ready, leading to a probe failure:

    st1232-ts 1-0055: Failed to read resolution: -6

Fix this by waiting until the device is ready, by trying to read the
Status Register until it indicates so, or until timeout.

On Armadillo 800 EVA, typically the first read fails with an I2C
transfer error, while the second read indicates the device is ready.

Fixes: 3a54a215410b1650 ("Input: st1232 - add support resolution reading")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/20201229162601.2154566-4-geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - do not read more bytes than needed</title>
<updated>2021-01-02T06:19:02+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-01-02T06:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b999dbea06b9874c7724a410f47a6bac1e219e37'/>
<id>urn:sha1:b999dbea06b9874c7724a410f47a6bac1e219e37</id>
<content type='text'>
st1232_ts_read_data() already reads ts-&gt;read_buf_len bytes (8 or 20
bytes) from the touchscreen controller.  This was fine when it was used
to read touch point coordinates only, but is overkill for reading the
touchscreen resolution, which just needs 3 bytes.

Optimize transfers by passing the wanted number of bytes.

Fixes: 3a54a215410b1650 ("Input: st1232 - add support resolution reading")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/20201229162601.2154566-3-geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - fix off-by-one error in resolution handling</title>
<updated>2021-01-02T06:19:00+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-01-02T06:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=928eedf013b25fcaeb6aef2ad721ed92c2e8bc66'/>
<id>urn:sha1:928eedf013b25fcaeb6aef2ad721ed92c2e8bc66</id>
<content type='text'>
Before, the maximum coordinates were fixed to (799, 479) or (319, 479),
depending on touchscreen controller type.  The driver was changed to
read the actual values from the touchscreen controller, but did not take
into account the returned values are not the maximum coordinates, but
the touchscreen resolution (e.g. 800 and 480).

Fix this by subtracting 1.

Fixes: 3a54a215410b1650 ("Input: st1232 - add support resolution reading")
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/20201229162601.2154566-2-geert+renesas@glider.be
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - add support resolution reading</title>
<updated>2020-11-12T01:54:12+00:00</updated>
<author>
<name>Andrej Valek</name>
<email>andrej.valek@siemens.com</email>
</author>
<published>2020-11-12T01:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a54a215410b1650798dc09d051806b1f900142d'/>
<id>urn:sha1:3a54a215410b1650798dc09d051806b1f900142d</id>
<content type='text'>
Hard-coding resolution for st1633 device was wrong. Some of LCDs like
YTS700TLBC-02-100C has assembled Sitronix st1633 touchcontroller too. But
the resolution is not 320x480 as was hard-coded.
Add new function which reads correct resolution directly from register.

Signed-off-by: Andrej Valek &lt;andrej.valek@siemens.com&gt;
Link: https://lore.kernel.org/r/20201103073949.12198-1-andrej.valek@siemens.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - switch to using MT-B protocol</title>
<updated>2019-10-29T04:04:27+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2019-10-22T17:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a1b92973fba47ceaeb0e337132876aba078fa8b7'/>
<id>urn:sha1:a1b92973fba47ceaeb0e337132876aba078fa8b7</id>
<content type='text'>
Switch the driver to the slotted variant of multitouch protocol (MT-B)
with in-kernel tracking of the contacts.

Tested-by: Matthias Fend &lt;Matthias.Fend@wolfvision.net&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - note that the receive buffer is DMA-safe</title>
<updated>2019-10-29T04:04:16+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2019-10-22T16:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=833c2c083856ef3077b51c908ec401fa0a130d57'/>
<id>urn:sha1:833c2c083856ef3077b51c908ec401fa0a130d57</id>
<content type='text'>
The receiving buffer is allocated separately from the main driver
data structure, and is naturally DMA-safe, so mark it as such when
building I2C transfer message.

Tested-by: Matthias Fend &lt;Matthias.Fend@wolfvision.net&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: st1232 - do not set parent device explicitly</title>
<updated>2019-10-29T04:03:55+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2019-10-22T03:50:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b67b6f598c5d6efe58f202b1f95cd0503583b728'/>
<id>urn:sha1:b67b6f598c5d6efe58f202b1f95cd0503583b728</id>
<content type='text'>
devm_input_allocate_device() already sets parent device for us.

Tested-by: Matthias Fend &lt;Matthias.Fend@wolfvision.net&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
