mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6 0/3] HID: Add support for the Himax HX83102J touchscreen
@ 2026-10-11 18:16 Michał Kopeć
  2026-10-11 18:16 ` [PATCH v6 1/3] dt-bindings: input: Add " Michał Kopeć
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michał Kopeć @ 2026-10-11 18:16 UTC (permalink / raw)
  To: linux-input
  Cc: devicetree, linux-mediatek, linux-arm-kernel, linux-kernel,
	jikos, bentiss, dmitry.torokhov, robh, krzk+dt, conor+dt,
	matthias.bgg, angelogioacchino.delregno, allencl_lin, tylor_yang,
	felix, dianders, Michał Kopeć

This series adds support for the touch function of the Himax HX83102J,
a touch and display driver integrated (TDDI) controller that reports HID
packets over SPI. It is used in the MediaTek MT8188 based Lenovo
Chromebook Duet ("Ciri").

As Krzysztof suggested, I have taken over the series and rewritten the
driver along the lines of hid-goodix-spi instead of cleaning up the
vendor code. Allen Lin and Tylor Yang are credited with Co-developed-by,
since the protocol, the firmware loading sequence and the heatmap
handling come from their code.

On Ciri the controller has no flash, so the firmware is loaded from a
file (himax_i2chid_1002.bin or himax_i2chid_1003.bin, depending on the
panel, the names ChromeOS uses). These files are not in linux-firmware.

Tested on Ciri (sku0, BOE panel): touch, stylus, display off and on,
suspend/resume and reloading the module.

The firmware report descriptor declares feature report 68 (usage
0xff0000c5), which the driver does not serve, so hid-multitouch logs
"failed to fetch feature 68" once per probe. Touch works regardless.

Changes in v6:
- Take over the series and use Allen's full name (Krzysztof).
- dt-bindings: describe how reset-gpios differs from
  display-reset-gpios (Krzysztof).
- dt-bindings: use unevaluatedProperties and drop the properties that
  only repeated the referenced schemas.
- Squash the four driver patches and rewrite the driver: a standard
  module_spi_driver() with devm resources, no kerneldoc for standard
  functions, no __func__ in messages, no probe message, no CONFIG_OF
  conditionals or .owner, dev_err_probe() in probe (Krzysztof).
- Rename the driver to hid-himax-spi (CONFIG_HID_HIMAX_SPI), like
  hid-goodix-spi.
- Power the touch function up from a work item when the panel has been
  prepared, so loading the firmware doesn't delay the panel, and drop
  the unexplained 2 s and 1 s delays of the vendor code.
- Request and validate the firmware once and keep it, so resume doesn't
  need the file system. Check every offset and size taken from the
  image.
- Keep the HID device across power cycles instead of recreating it.
- Request the interrupt in probe, disabled until the HID device exists,
  and take its trigger from the device tree.
- Retry a failed power up when the panel is prepared again, and pass
  -EPROBE_DEFER from the panel lookup through.
- Size the heatmap buffers for an odd number of nodes, and use
  hid_safe_input_report().
- Use crc32c() instead of an open-coded CRC-32C.
- Only reset the IC when reading the event stack fails, not when the
  HID core rejects a report.

v5: https://lore.kernel.org/all/20261003142741.48634-1-michal@nozomi.space/
v4: https://lore.kernel.org/all/TY0PR06MB56110754EB9D827BE3304A259E0F2@TY0PR06MB5611.apcprd06.prod.outlook.com/




Michał Kopeć (3):
  dt-bindings: input: Add Himax HX83102J touchscreen
  HID: Add Himax HX83102J SPI touchscreen driver
  arm64: dts: mediatek: mt8188-geralt-ciri: Add the touchscreen

 .../input/touchscreen/himax,hx83102j.yaml     |   98 ++
 MAINTAINERS                                   |    7 +
 .../dts/mediatek/mt8188-geralt-ciri-sku1.dts  |    4 +
 .../dts/mediatek/mt8188-geralt-ciri-sku3.dts  |    4 +
 .../dts/mediatek/mt8188-geralt-ciri-sku5.dts  |    4 +
 .../dts/mediatek/mt8188-geralt-ciri-sku7.dts  |    4 +
 .../boot/dts/mediatek/mt8188-geralt-ciri.dtsi |   33 +
 drivers/hid/Kconfig                           |   13 +
 drivers/hid/Makefile                          |    1 +
 drivers/hid/hid-himax-spi.c                   | 1300 +++++++++++++++++
 10 files changed, 1468 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/input/touchscreen/himax,hx83102j.yaml
 create mode 100644 drivers/hid/hid-himax-spi.c


base-commit: fd179f8a05be3ccae366b9b96e176b51fbe54aab
-- 
2.56.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-11 23:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-11 18:16 [PATCH v6 0/3] HID: Add support for the Himax HX83102J touchscreen Michał Kopeć
2026-10-11 18:16 ` [PATCH v6 1/3] dt-bindings: input: Add " Michał Kopeć
2026-10-11 18:16 ` [PATCH v6 2/3] HID: Add Himax HX83102J SPI touchscreen driver Michał Kopeć
2026-10-11 23:06   ` Uwe Kleine-König
2026-10-11 18:16 ` [PATCH v6 3/3] arm64: dts: mediatek: mt8188-geralt-ciri: Add the touchscreen Michał Kopeć

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®