|
| 1 | +# Copyright (c) 2025 Renesas Electronics Corporation |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +config INPUT_RENESAS_RA_CTSU |
| 5 | + bool "Renesas RA Capacitive Touch driver" |
| 6 | + default y |
| 7 | + depends on DT_HAS_RENESAS_RA_CTSU_ENABLED |
| 8 | + select USE_RA_FSP_CTSU |
| 9 | + select USE_RA_FSP_TOUCH |
| 10 | + select SYS_MEM_BLOCKS |
| 11 | + select GPIO |
| 12 | + select PINCTRL |
| 13 | + help |
| 14 | + Enable Renesas RA Touch Sensing driver. |
| 15 | + |
| 16 | +if INPUT_RENESAS_RA_CTSU |
| 17 | + |
| 18 | +config INPUT_RENESAS_RA_DEVICE_VCC |
| 19 | + int "SoC VCC input in minivolt" |
| 20 | + default 3300 |
| 21 | + help |
| 22 | + SoC VCC input in milivolt. |
| 23 | + |
| 24 | +config INPUT_RENESAS_RA_QE_TOUCH_CFG |
| 25 | + bool "Using QE Touch Workflow to config this driver" |
| 26 | + help |
| 27 | + If this config was enabled, setting for CTSU and Cap |
| 28 | + Touch driver will be reflected the setting that generated |
| 29 | + from QE Touch Workflow. |
| 30 | + Please add the generated C source files into the app CMakeLists |
| 31 | + to make the driver can using it. |
| 32 | + |
| 33 | +if !INPUT_RENESAS_RA_QE_TOUCH_CFG |
| 34 | + |
| 35 | +config INPUT_RENESAS_RA_CTSU_NUM_SELF_ELEMENTS |
| 36 | + int "Number of self-capacitance elements" |
| 37 | + default 0 |
| 38 | + help |
| 39 | + Number of self-capacitance elements in the CTSU. |
| 40 | + |
| 41 | +config INPUT_RENESAS_RA_CTSU_NUM_MUTUAL_ELEMENTS |
| 42 | + int "Number of mutual-capacitance elements" |
| 43 | + default 0 |
| 44 | + help |
| 45 | + Number of mutual-capacitance elements in the CTSU. |
| 46 | + |
| 47 | +choice INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE |
| 48 | + prompt "Type of chattering suppression" |
| 49 | + default INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE_A |
| 50 | + |
| 51 | +config INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE_A |
| 52 | + bool "Counter of exceed threshold is hold within hysteresis range" |
| 53 | + help |
| 54 | + Counter of exceed threshold is hold within hysteresis range. |
| 55 | + |
| 56 | +config INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE_B |
| 57 | + bool "Counter of exceed threshold is reset within hysteresis range" |
| 58 | + help |
| 59 | + Counter of exceed threshold is reset within hysteresis range. |
| 60 | + |
| 61 | +endchoice # INPUT_RENESAS_RA_CTSU_CHATTERING_SUPPRESSION_TYPE |
| 62 | + |
| 63 | +endif # !INPUT_RENESAS_RA_QE_TOUCH_CFG |
| 64 | + |
| 65 | +config INPUT_RENESAS_RA_CTSU_POLLING_INTERVAL_MS |
| 66 | + int "CTSU debounce interval time" |
| 67 | + range 20 500 |
| 68 | + default 100 |
| 69 | + help |
| 70 | + Debouncing interval time in milliseconds. |
| 71 | + |
| 72 | +config INPUT_RENESAS_RA_CTSU_STABILIZATION_TIME_US |
| 73 | + int "CTSU stabilization time" |
| 74 | + default 20 |
| 75 | + help |
| 76 | + Stabilization time required to wait between 2 scans. |
| 77 | + |
| 78 | +config INPUT_RENESAS_RA_CTSU_DRV_STACK_SIZE |
| 79 | + int "CTSU internal thread stack size" |
| 80 | + default 512 |
| 81 | + help |
| 82 | + CTSU driver internal thread stack size. |
| 83 | + |
| 84 | +config INPUT_RENESAS_RA_CTSU_DRV_PRIORITY |
| 85 | + int "CTSU internal thread priority" |
| 86 | + default 8 |
| 87 | + help |
| 88 | + CTSU driver internal thread priority. |
| 89 | + |
| 90 | +config INPUT_RENESAS_RA_CTSU_MSG_MEM_BLOCK_SIZE |
| 91 | + int "CTSU internal sys_mem_blocks allocator size" |
| 92 | + default 10 |
| 93 | + help |
| 94 | + CTSU driver internal sys_mem_blocks allocator maximum num blocks. |
| 95 | + |
| 96 | +endif # INPUT_RENESAS_RA_CTSU |
0 commit comments