From 42d9cf1b9a39a69ba3e9c2c6fdc382a39ca8452c Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Tue, 16 May 2023 15:16:00 +0000 Subject: [PATCH] doc: input: expand the kscan compatibility description Add few details about the kscan compatibility driver, mention the relevant Kconfig options and an example (which is also present in the binding file). Signed-off-by: Fabio Baltieri --- doc/services/input/index.rst | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/services/input/index.rst b/doc/services/input/index.rst index 61b123d515..0256a7b805 100644 --- a/doc/services/input/index.rst +++ b/doc/services/input/index.rst @@ -59,9 +59,24 @@ Kscan Compatibility ******************* Input devices generating X/Y/Touch events can be used in existing applications -based on the :ref:`kscan_api` API by defining a -:dtcompatible:`zephyr,kscan-input` node as a childnode of the corresponding -input device. +based on the :ref:`kscan_api` API by enabling both +:kconfig:option:`CONFIG_INPUT` and :kconfig:option:`CONFIG_KSCAN`, defining a +:dtcompatible:`zephyr,kscan-input` node as a child node of the corresponding +input device and pointing the ``zephyr,keyboard-scan`` chosen node to the +compatibility device node, for example: + +.. code-block:: devicetree + + chosen { + zephyr,keyboard-scan = &kscan_input; + }; + + ft5336@38 { + ... + kscan_input: kscan-input { + compatible = "zephyr,kscan-input"; + }; + }; API Reference *************