zephyr/include
Peter Bigot 2aab687270 device: introduce device_usable_check
As we add support for devices that are powered down, or are present
but have not yet been started, we need more precise information about
why a device isn't ready, so callers can take appropriate steps to
make it ready.

Add a new function that determines readiness and indicates the reason
for not being ready in a defined unique error code per condition.
Expose this in both a syscall form to be invoked from applications,
and a unchecked form that can be used from supervisor contexts
including syscall implementation functions.

Anticipated future conditions include:
* device is powered down and needs to be brought back up;
* device was installed disabled and has not been started.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-02-19 05:17:37 -06:00
..
app_memory kernel: move thread definitions to thread.h 2021-01-13 18:18:42 -05:00
arch arch: riscv: linker: fix _image_rom_start symbol 2021-02-16 15:16:56 +03:00
audio audio: dmic: fix compile error on arm gcc 8 2021-02-16 15:29:16 +03:00
bluetooth Bluetooth: host: Add definitions for generate DHKey v2 commands 2021-02-18 13:50:22 +01:00
canbus subsys: canopen: Add a wrapper to avoid passing device to CO_init 2020-09-02 13:48:13 +02:00
cmsis_rtos_v1
cmsis_rtos_v2 global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
console device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
crypto device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
data doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
debug debug: coredump: remove z_ prefix for stuff used outside subsys 2021-01-21 22:08:59 -05:00
devicetree devicetree: clocks: provide accessors for controller phandle 2021-02-16 14:15:40 -06:00
dfu modules: introduce MCUBOOT_BOOTUTIL module 2021-01-14 18:03:38 +01:00
disk device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
display device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
drivers drivers/interrupt_controller: stm32: Make use of DEVICE_DT API 2021-02-17 14:26:23 -06:00
dt-bindings drivers: pcie: Introduce API to look up devices by ID 2021-02-15 08:23:05 -05:00
fs include/fs: fixed typo in fs_file_t_init() description 2021-02-05 07:32:20 -05:00
ipc ipc: RPMsg service to register multiple endpoints 2021-01-19 22:07:09 +01:00
kernel kernel: move thread definitions to thread.h 2021-01-13 18:18:42 -05:00
linker soc: arm: st_stm32: add support for STM32 backup SRAM 2021-02-15 08:04:24 -05:00
logging logging: fix warnings when building with -Wunused-variable 2021-02-04 07:43:07 -05:00
lorawan lorawan: Add userspace-defined battery level callback API 2021-02-15 08:19:03 -05:00
mgmt doc: fix @param usage in callbacks 2020-12-18 12:18:28 +01:00
net net: lwm2m: Utility functions added to LWM2M Engine 2021-02-19 10:52:08 +02:00
posix include/posix: fix extern "C" placement 2020-10-13 10:05:30 -05:00
power power: constraints: Update constraint documentation 2021-02-15 08:08:36 -05:00
random random: Add syscalls for random subsystem 2020-07-08 21:05:36 -04:00
settings settings: disallow modifying the content of a static subtree name 2020-07-27 19:03:44 +02:00
shell shell: internal api update in shell.h 2021-01-14 12:07:25 +01:00
stats zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
storage storage/flash_map: Added function for get erased byte value 2020-10-30 15:53:38 +01:00
sys kernel/include: Put kernel stack memory in the right memory 2021-02-11 14:47:40 -05:00
timing timing: do not repeatedly do init()/start()/stop() 2020-11-11 23:55:49 -05:00
toolchain xcc: define __INT*_C() and __UINT*_C() 2021-02-05 07:45:07 -05:00
tracing tracing: trace mutex/semaphore using dedicated calls 2020-08-24 13:21:12 +02:00
usb license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
zephyr zephyr: introduce z_max_align_t 2020-11-17 11:44:16 +02:00
cache.h cache: libmetal: Redirect sys_cache_flush() 2021-01-19 14:31:02 -05:00
device.h device: introduce device_usable_check 2021-02-19 05:17:37 -06:00
devicetree.h devicetree: make sure DT_INVALID_NODE docstring appears 2021-02-08 08:26:42 -05:00
ec_host_cmd.h include: remove enum build assert 2020-10-02 11:44:39 +02:00
emul.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
exc_handle.h kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
fatal.h doc: fix misspelling in API doxygen comments 2019-10-29 06:00:14 +01:00
generated_dts_board.h license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
init.h device: deprecate DEVICE_AND_API_INIT 2021-01-12 08:31:12 -06:00
irq_nextlevel.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
irq_offload.h irq: Change offload API to take a constant parameter 2020-09-02 13:48:13 +02:00
irq.h irq: document requirement that irq_lock/unlock provides a memory barrier 2021-01-26 13:42:17 -05:00
kernel_includes.h kernel: move thread definitions to thread.h 2021-01-13 18:18:42 -05:00
kernel_structs.h power: standarize PM Kconfigs and cleanup 2020-12-09 15:18:29 -05:00
kernel_version.h zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
kernel.h x86: rename CONFIG_SSE* to CONFIG_X86_SSE* 2021-02-15 08:21:15 -05:00
mempool_heap.h kernel: Remove z_mem_pool wrapper internals 2020-12-07 21:50:14 -05:00
ptp_clock.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
sched_priq.h
shared_irq.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
spinlock.h kernel: fix usage of KERNEL_COHERENCE macro 2021-02-03 10:42:04 -05:00
sw_isr_table.h irq: Change dynamic API to take a constant parameter 2020-09-02 13:48:13 +02:00
sys_clock.h api: add C++ friendly version of Z_TIMEOUT_TICKS. 2021-01-20 09:23:20 -05:00
syscall_handler.h kernel: Cleanup logger setup in kernel files 2020-11-27 09:56:34 -05:00
syscall.h global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
timeout_q.h kernel: timer: update _timeout API for const correctness 2020-10-02 11:29:14 +02:00
toolchain.h ARC: toolchain: handle difference in macros for MWDT and ARC GNU 2020-09-05 10:22:56 -05:00
wait_q.h headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
zephyr.h