/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * daedalus-v4l2 — chardev bridge interface (kernel-internal). */ #ifndef DAEDALUS_V4L2_CHARDEV_H #define DAEDALUS_V4L2_CHARDEV_H #include int daedalus_chardev_init(void); void daedalus_chardev_exit(void); /** * daedalus_chardev_enqueue_req() - queue a request for the daemon * @type: request type (must have high bit clear; see enum * daedalus_msg_type in include/daedalus_v4l2_proto.h) * @cookie: caller-supplied identifier; echoed in matching response * @payload: pointer to payload bytes (may be NULL if @payload_len = 0) * @payload_len: payload size in bytes (0..DAEDALUS_PROTO_MAX_PAYLOAD) * * Return: 0 on success, -ENODEV if chardev not registered, * -ENOSPC if the queue is full, -EMSGSIZE if @payload_len is * too large, -EINVAL if @type has the response bit set, * -ENOMEM on allocation failure. */ int daedalus_chardev_enqueue_req(__u32 type, __u32 cookie, const void *payload, size_t payload_len); #endif /* DAEDALUS_V4L2_CHARDEV_H */