ViezeVingertjes opened a new pull request, #22398:
URL: https://github.com/apache/nuttx/pull/22398

   ## Summary
   
   Add a touchscreen lower-half driver for the Hynitron CST92xx family
   (CST9217, CST9220) of I2C capacitive touch controllers, used for example
   on the Waveshare ESP32-S3-Touch-AMOLED-2.16.
   
   At registration the driver optionally pulses RST through a board
   callback, enters the controller information mode to verify the firmware
   check code and chip type and to read the native resolution, returns the
   controller to normal mode and registers /dev/inputN with the common
   touchscreen upper half.
   
   The INT pin is handled through board attach/enable callbacks, so the
   driver has no MCU dependency.  Each interrupt queues a worker on HPWORK
   that reads the report block at 0xd000, acknowledges it by writing 0xab
   and turns the reported contacts into TOUCH_DOWN/MOVE/UP events with
   stable IDs and timestamps.  Up to CONFIG_INPUT_CST92XX_MAX_POINTS
   contacts are reported.  Output resolution and swap/mirror flags are set
   in the board configuration.  An optional polled mode is available for
   boards without INT.
   
   Tested on Waveshare ESP32-S3-Touch-AMOLED-2.16 (CST9220) with the LVGL
   widgets demo: taps and scrolling land at the right positions.  Built in
   interrupt and polled mode, with debug output enabled, no warnings.
   
   ## Impact
   
   * Is new feature added? Is existing feature changed? YES: new driver 
(CONFIG_INPUT_CST92XX), off by default.
   * Impact on user (will user need to adapt to change)? NO
   * Impact on build (will build process change)? NO
   * Impact on hardware (will arch(s) / board(s) / driver(s) change)? NO
   * Impact on documentation (is update required / provided)? YES: driver 
documentation.
   * Impact on security (any sort of implications)? NO
   * Impact on compatibility (backward/forward/interoperability)? NO
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   * Build Host(s): Linux x86_64, xtensa-esp-elf GCC 15.2.0 
(esp-15.2.0_20251204), riscv32-esp-elf GCC 15.2.0 for the ESP32-C3 build.
   * Target(s): Waveshare ESP32-S3-Touch-AMOLED-2.16 (ESP32-S3R8, 16 MB flash, 
8 MB PSRAM).
   * On the board (CST9220, board support follows in a separate PR): LVGL 
widgets demo, tapping and scrolling.
   
   Builds (each on current master plus this PR only):
   
   * PASS pr/cst92xx-touch irq esp32s3-devkit:nsh (warnings: 0)
   * PASS pr/cst92xx-touch poll esp32s3-devkit:nsh (warnings: 0)
   
   Testing logs before change:
   
   ```
   n/a (new driver)
   ```
   
   Testing logs after change:
   
   ```
   Taps and scrolling land at the right positions in the LVGL widgets demo 
(checked visually).
   ```
   
   ## PR verification Self-Check
   
   * [x] This PR introduces only one functional change.
   * [x] I have updated all required description fields above.
   * [x] My PR adheres to Contributing Guidelines and Documentation (git commit 
title and message, coding standard, etc).
   * [ ] My PR is still work in progress (not ready for review).
   * [x] My PR is ready for review and can be safely merged into a codebase.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [PR] drivers/input: Add CST92... ViezeVingertjes (via GitHub) via commits

Reply via email to