Skip to content

drivers: input: chsc6x: add CHSC6540 support#104710

Open
walidbadar wants to merge 1 commit intozephyrproject-rtos:mainfrom
walidbadar:chipsemi_chsc6x
Open

drivers: input: chsc6x: add CHSC6540 support#104710
walidbadar wants to merge 1 commit intozephyrproject-rtos:mainfrom
walidbadar:chipsemi_chsc6x

Conversation

@walidbadar
Copy link
Contributor

@walidbadar walidbadar commented Feb 28, 2026

  • Introduce a function pointer (read_data) in driver config to abstract controller-specific data parsing.
  • Implement chsc6x_read_data() and chsc6540_read_data() with variant-specific register layouts.
  • Switch to DT_FOREACH_STATUS_OKAY() for per-compatible device instantiation.
  • Replace instance-based macros with node-based DEVICE_DT_DEFINE().

This change allows the driver to support both chipsemi,chsc6x and chipsemi,chsc6540 via devicetree without duplicating core logic.

@zephyrbot zephyrbot added area: Input Input Subsystem and Drivers area: Samples Samples area: Devicetree Binding PR modifies or adds a Device Tree binding labels Feb 28, 2026
@walidbadar walidbadar force-pushed the chipsemi_chsc6x branch 5 times, most recently from e309ed1 to 75e91d2 Compare February 28, 2026 17:50
Add support for the Chipsemi CHSC6540 touch controller and refactor
the driver to support multiple compatible variants.

- Introduce a function pointer (read_data) in driver config to abstract
  controller-specific data parsing.
- Implement chsc6x_read_data() and chsc6540_read_data() with
  variant-specific register layouts.
- Switch to DT_FOREACH_STATUS_OKAY() for per-compatible device
  instantiation.
- Replace instance-based macros with node-based DEVICE_DT_DEFINE().

This change allows the driver to support both chipsemi,chsc6x and
chipsemi,chsc6540 via devicetree without duplicating core logic.

Signed-off-by: Muhammad Waleed Badar <walid.badar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Devicetree Binding PR modifies or adds a Device Tree binding area: Input Input Subsystem and Drivers area: Samples Samples

3 participants