Skip to content

Input: zinitix - support the 6-byte/count touch report used by bt532#449

Open
bufordtjustice2918 wants to merge 1 commit into
msm8916-mainline:wip/msm8916/7.0from
bufordtjustice2918:zinitix-bt532-multitouch
Open

Input: zinitix - support the 6-byte/count touch report used by bt532#449
bufordtjustice2918 wants to merge 1 commit into
msm8916-mainline:wip/msm8916/7.0from
bufordtjustice2918:zinitix-bt532-multitouch

Conversation

@bufordtjustice2918

Copy link
Copy Markdown

The zinitix driver assumes an 8-byte per-contact report stride with a per-finger bitmask in report byte[2]. The bt532 firmware on the Samsung Galaxy Tab A 8.0 (msm8916-samsung-gt58) instead packs contacts at a 6-byte stride and reports a finger count in byte[2]. Under the 8-byte/bitmask assumption, fingers 1+ are read misaligned and a two-finger report collapses to a single contact — no multitouch.

This adds a per-compatible struct zinitix_chip_data selecting the report stride and byte[2] interpretation, attached to the zinitix,bt532 compatible only. All other compatibles keep the existing 8-byte/bitmask behaviour unchanged.

Upstream status: submitted to linux-input / Dmitry Torokhov, awaiting review:
https://lore.kernel.org/all/20260706180826.408989-1-kavansmith82@gmail.com/

Per CONTRIBUTING.md this touches a shared upstream driver, so it was submitted upstream first; posting here so MSM8916 devices get working multitouch in the meantime. The kernel.org AI review bot flagged two pre-existing driver issues (DMA-unsafe stack buffers in the I2C path, input device registered before zinitix,mode is read) — neither is introduced or worsened by this patch.

Tested on: samsung-gt58 (SM-T350) running postmarketOS mainline — pinch/two-finger gestures work; single-touch behaviour on the default 8-byte path unchanged. checkpatch-clean (0 errors, 0 warnings on the diff).

🤖 Generated with Claude Code

The driver assumes an 8-byte per-contact report stride with a per-finger
bitmask in report byte[2]. bt532 firmware (Samsung Galaxy Tab A 8.0,
msm8916-samsung-gt58) instead packs contacts at a 6-byte stride and reports
a finger COUNT in byte[2]. Under the 8-byte/bitmask assumption fingers 1+
are read misaligned, and a two-finger report (count 0x02) makes
for_each_set_bit() visit only slot 1, collapsing multitouch to a single
contact.

Add a per-compatible struct zinitix_chip_data that selects the report stride
and how byte[2] is interpreted, and attach it to the bt532 compatible (the
only in-tree user of it). All other compatibles keep the existing 8-byte,
bitmask behaviour unchanged. Contacts are parsed at the chip's stride, and
for count-style firmware every slot the chip marks with SUB_BIT_EXIST is
reported.

Signed-off-by: Kavan Smith <kavansmith82@gmail.com>
@TravMurav

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants