<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/input/touchscreen/zinitix.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-10-18T23:03:04+00:00</updated>
<entry>
<title>Input: zinitix - don't fail if linux,keycodes prop is absent</title>
<updated>2024-10-18T23:03:04+00:00</updated>
<author>
<name>Nikita Travkin</name>
<email>nikita@trvn.ru</email>
</author>
<published>2024-10-04T16:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2de01e0e57f3ebe7f90b08f6bca5ce0f3da3829f'/>
<id>urn:sha1:2de01e0e57f3ebe7f90b08f6bca5ce0f3da3829f</id>
<content type='text'>
When initially adding the touchkey support, a mistake was made in the
property parsing code. The possible negative errno from
device_property_count_u32() was never checked, which was an oversight
left from converting to it from the of_property as part of the review
fixes.

Re-add the correct handling of the absent property, in which case zero
touchkeys should be assumed, which would disable the feature.

Reported-by: Jakob Hauser &lt;jahau@rocketmail.com&gt;
Tested-by: Jakob Hauser &lt;jahau@rocketmail.com&gt;
Fixes: 075d9b22c8fe ("Input: zinitix - add touchkey support")
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Nikita Travkin &lt;nikita@trvn.ru&gt;
Tested-by: Yassine Oudjana &lt;y.oudjana@protonmail.com&gt;
Link: https://lore.kernel.org/r/20241004-zinitix-no-keycodes-v2-1-876dc9fea4b6@trvn.ru
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - varying icon status registers</title>
<updated>2024-09-01T02:12:26+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2024-08-30T22:52:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dac973838b0a37d32141c50cf3882b5ff0e42543'/>
<id>urn:sha1:dac973838b0a37d32141c50cf3882b5ff0e42543</id>
<content type='text'>
The different revisions of the Zinitix BTXXX touchscreens place
the icon status register (to read out touchkey status) in
different places. Use the chip revision bits to discern
between the different versions at runtime.

This makes touchkeys work on the BT404 on the Samsung Codina
GT-I8160 mobile phone.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20240830-zinitix-tk-versions-v2-2-90eae6817eda@linaro.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - read and cache device version numbers</title>
<updated>2024-09-01T02:05:47+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2024-08-30T22:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5278bb4cd6e96504ad4700bc1e445fbe7d6711e3'/>
<id>urn:sha1:5278bb4cd6e96504ad4700bc1e445fbe7d6711e3</id>
<content type='text'>
The chip hardware revision, firmware version and regdata
revision is needed to discern because for example touchkeys
are handled by different registers on different versions of
the chip. Example output from BT404:

Zinitix-TS 3-0020: chip revision 4040 firmware version 0088
  regdata version 0004

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20240830-zinitix-tk-versions-v2-1-90eae6817eda@linaro.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - add touchkey support</title>
<updated>2024-07-19T23:15:57+00:00</updated>
<author>
<name>Nikita Travkin</name>
<email>nikita@trvn.ru</email>
</author>
<published>2024-07-19T22:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=075d9b22c8feacd02f3ffdce918d34790a3ba9d1'/>
<id>urn:sha1:075d9b22c8feacd02f3ffdce918d34790a3ba9d1</id>
<content type='text'>
Zinitix touch controllers can use some of the sense lines for virtual
keys (like those found on many phones). Add support for those keys.

Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Nikita Travkin &lt;nikita@trvn.ru&gt;
Link: https://lore.kernel.org/r/20240717-zinitix-tkey-v5-2-52ea4cd4bd50@trvn.ru
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: Switch i2c drivers back to use .probe()</title>
<updated>2023-05-17T16:59:11+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-05-17T16:55:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d8bde56dfd86a0bba9206de8574e58c8aaac4f0f'/>
<id>urn:sha1:d8bde56dfd86a0bba9206de8574e58c8aaac4f0f</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230517164645.162294-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - use of_property_present() for testing DT property presence</title>
<updated>2023-03-17T11:17:30+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-03-11T04:26:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eaedf192f65fc4e3e2001b8e09940386cc494bd5'/>
<id>urn:sha1:eaedf192f65fc4e3e2001b8e09940386cc494bd5</id>
<content type='text'>
It is preferred to use typed property access functions (i.e.
of_property_read_&lt;type&gt; functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20230310144708.1542682-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr()</title>
<updated>2023-01-10T04:25:28+00:00</updated>
<author>
<name>Jonathan Cameron</name>
<email>Jonathan.Cameron@huawei.com</email>
</author>
<published>2023-01-02T18:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61df952bfd1ac1a67f030a472faa1eb78fa428fc'/>
<id>urn:sha1:61df952bfd1ac1a67f030a472faa1eb78fa428fc</id>
<content type='text'>
SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection
against unused function warnings.  The new combination of pm_sleep_ptr()
and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions,
thus suppressing the warning, but still allowing the unused code to be
removed. Thus also drop the __maybe_unused markings.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20230102181842.718010-69-jic23@kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - rename defines ZINITIX_*</title>
<updated>2022-05-28T04:49:34+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2022-04-25T04:57:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=077fdc9b59b0578752209a850231ee9ea1b3dabe'/>
<id>urn:sha1:077fdc9b59b0578752209a850231ee9ea1b3dabe</id>
<content type='text'>
The defines are sometimes named BT541_* and sometimes
ZINITIX_*, name them all ZINITIX_* because they certainly
apply to a lot more touchscreens than the BT541.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20220410120059.2583849-3-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - do not report shadow fingers</title>
<updated>2022-03-07T22:23:35+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2022-03-04T21:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e941dc13fd3717122207d74539ab95da07ef797f'/>
<id>urn:sha1:e941dc13fd3717122207d74539ab95da07ef797f</id>
<content type='text'>
I observed the following problem with the BT404 touch pad
running the Phosh UI:

When e.g. typing on the virtual keyboard pressing "g" would
produce "ggg".

After some analysis it turns out the firmware reports that three
fingers hit that coordinate at the same time, finger 0, 2 and
4 (of the five available 0,1,2,3,4).

DOWN
  Zinitix-TS 3-0020: finger 0 down (246, 395)
  Zinitix-TS 3-0020: finger 1 up (0, 0)
  Zinitix-TS 3-0020: finger 2 down (246, 395)
  Zinitix-TS 3-0020: finger 3 up (0, 0)
  Zinitix-TS 3-0020: finger 4 down (246, 395)
UP
  Zinitix-TS 3-0020: finger 0 up (246, 395)
  Zinitix-TS 3-0020: finger 2 up (246, 395)
  Zinitix-TS 3-0020: finger 4 up (246, 395)

This is one touch and release: i.e. this is all reported on
touch (down) and release.

There is a field in the struct touch_event called finger_cnt
which is actually a bitmask of the fingers active in the
event.

Rename this field finger_mask as this matches the use contents
better, then use for_each_set_bit() to iterate over just the
fingers that are actally active.

Factor out a finger reporting function zinitix_report_fingers()
to handle all fingers.

Also be more careful in reporting finger down/up: we were
reporting every event with input_mt_report_slot_state(..., true);
but this should only be reported on finger down or move,
not on finger up, so also add code to check p-&gt;sub_status
to see what is happening and report correctly.

After this my Zinitix BT404 touchscreen report fingers
flawlessly.

The vendor drive I have notably does not use the "finger_cnt"
and contains obviously incorrect code like this:

  if (touch_dev-&gt;touch_info.finger_cnt &gt; MAX_SUPPORTED_FINGER_NUM)
      touch_dev-&gt;touch_info.finger_cnt = MAX_SUPPORTED_FINGER_NUM;

As MAX_SUPPORTED_FINGER_NUM is an ordinal and the field is
a bitmask this seems quite confused.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20220228233017.2270599-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: zinitix - add new compatible strings</title>
<updated>2022-02-16T00:30:24+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2022-02-16T00:29:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de8aa31ac7c23af98fe24d1c1b43b065027d6af5'/>
<id>urn:sha1:de8aa31ac7c23af98fe24d1c1b43b065027d6af5</id>
<content type='text'>
This driver works just fine with the BT404 version of the touchscreen
as well. Tested on the Samsung GT-I8160 (Codina) mobile phone.

Add all the new variants from the binding document so people can
easily test them, we believe most of them work more or less.

Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20220214234033.1052681-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
