zephyr/subsys/rtio/Kconfig.workq
Luis Ubieda c66d0d81c2 rtio: workq: Default workqueue to two threads with SPI/I2C/I3C
As to facilitate work items preemption, common for sensor read ops.

e.g:
- Sensor read (submitted through workqueue).
- SPI read (submitted through workqueue using default handler).

This requires at least 2 thread pools to allow SPI read to complete,
to then come back and complete sensor reading.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-03-07 20:00:18 +01:00

37 lines
994 B
Plaintext

# Copyright (c) 2024 Croxel Inc.
# SPDX-License-Identifier: Apache-2.0
config RTIO_WORKQ
bool "RTIO Work-queues service to process Sync operations"
select SCHED_DEADLINE
select P4WQ_INIT_STAGE_EARLY
select RTIO_CONSUME_SEM
help
Enable RTIO Work-queues to allow processing synchronous operations
in an asynchronous non-blocking fashion.
if RTIO_WORKQ
config RTIO_WORKQ_PRIO_MED
int "Medium Thread priority of RTIO Work-queues"
default MAIN_THREAD_PRIORITY
config RTIO_WORKQ_STACK_SIZE
int "Thread stack-size of RTIO Workqueues"
default 2048
config RTIO_WORKQ_THREADS_POOL
int "Number of threads to use for processing work-items"
default 2 if SPI_RTIO || I2C_RTIO || I3C_RTIO
default 1
config RTIO_WORKQ_POOL_ITEMS
int "Pool of work items to use with the RTIO Work-queues"
default 4
help
Configure the Pool of work items appropriately to your
application, the more simultaneous requests you expect
to issue, the bigger this pool should be.
endif # RTIO_WORKQ