1# Copyright (c) 2023 Intel Corporation 2# SPDX-License-Identifier: Apache-2.0 3 4config SENSING 5 bool "Sensing Subsystem" 6 default y 7 depends on DT_HAS_ZEPHYR_SENSING_ENABLED 8 select RTIO 9 select RTIO_CONSUME_SEM 10 select SENSOR 11 select SENSOR_ASYNC_API 12 help 13 Enable Sensing Subsystem. 14 15if SENSING 16 17module = SENSING 18module-str = sensing 19source "subsys/logging/Kconfig.template.log_config" 20 21config SENSING_RTIO_SQE_NUM 22 int "Number of the sensing RTIO SQE" 23 default 32 24 25config SENSING_RTIO_CQE_NUM 26 int "Number of the sensing RTIO SQE" 27 default 32 28 29config SENSING_RTIO_BLOCK_SIZE 30 int "Block size of the RTIO context" 31 default 64 32 33config SENSING_RTIO_BLOCK_COUNT 34 int "Number of memory blocks of the RTIO context" 35 default 32 36 37config SENSING_MAX_SENSITIVITY_COUNT 38 int "maximum sensitivity count one sensor could support" 39 depends on SENSING 40 default 6 41 help 42 This is the maximum sensitivity count one sensor could support, 43 some sensors such as ALS sensor could define different sensitivity for each data filed, 44 So, maximum sensitivity count is needed for sensors 45 Typical values are 6 46 47config SENSING_RUNTIME_THREAD_STACK_SIZE 48 int "stack size for sensing subsystem runtime thread" 49 depends on SENSING 50 default 4096 51 help 52 This is the stack size for sensing subsystem runtime thread 53 Typical values are 4096 54 55config SENSING_RUNTIME_THREAD_PRIORITY 56 int "priority for sensing subsystem runtime thread" 57 depends on SENSING 58 default 7 59 help 60 This is the thread priority for sensor subsystem runtime thread 61 Ring buffer data is stored by runtime thread, and then give semaphore 62 to notify dispatch thread, runtime thread priority should lower than 63 dispatch thread priority to ensure dispatch thread could fetch data as 64 soon as runtime thread give semaphore. Take for example, if runtime 65 priority is higher than dispatch thread, and runtime running in full 66 loading with no sleep, then dispatch thread has no change to fetch 67 data, then ring buf will always be put into data until overflow. 68 Typical values are 9 69 70config SENSING_DISPATCH_THREAD_STACK_SIZE 71 int "stack size for sensor dispatch thread" 72 depends on SENSING 73 default 1024 74 help 75 This is the stack size for sensor dispatch thread 76 Typical values are 1024 77 78config SENSING_DISPATCH_THREAD_PRIORITY 79 int "priority for sensor dispatch thread" 80 depends on SENSING 81 default 8 82 help 83 This is the thread priority for sensing subsystem dispatch thread 84 Ring buffer data should be fetched ASAP, so Dispatch 85 thread priority should be higher than runtime thread 86 Typical values are 8 87 88source "subsys/sensing/sensor/phy_3d_sensor/Kconfig" 89source "subsys/sensing/sensor/hinge_angle/Kconfig" 90 91endif # SENSING 92