Lines Matching +full:separately +full:- +full:defined
1 .. SPDX-License-Identifier: GPL-2.0+
8 User-Space EC Interface (cdev)
11 The ``surface_aggregator_cdev`` module provides a misc-device for the SSAM
12 controller to allow for a (more or less) direct connection from user-space to
18 device-file. All functionality of this interface is provided via IOCTLs.
19 These IOCTLs and their respective input/output parameter structs are defined in
23 at https://github.com/linux-surface/surface-aggregator-module/tree/master/scripts/ssam.
31 Events can be received by reading from the device-file. The are represented by
37 interface, associated with a specific target category and device-file-instance.
43 notifiers work per-client (i.e. per-device-file-instance), events are enabled
45 non-userspace). The ``SSAM_CDEV_EVENT_ENABLE`` and ``SSAM_CDEV_EVENT_DISABLE``
65 .. flat-table:: Controller IOCTLs
67 :header-rows: 1
69 * - Type
70 - Number
71 - Direction
72 - Name
73 - Description
75 * - ``0xA5``
76 - ``1``
77 - ``WR``
78 - ``REQUEST``
79 - Perform synchronous SAM request.
81 * - ``0xA5``
82 - ``2``
83 - ``W``
84 - ``NOTIF_REGISTER``
85 - Register event notifier.
87 * - ``0xA5``
88 - ``3``
89 - ``W``
90 - ``NOTIF_UNREGISTER``
91 - Unregister event notifier.
93 * - ``0xA5``
94 - ``4``
95 - ``W``
96 - ``EVENT_ENABLE``
97 - Enable event source.
99 * - ``0xA5``
100 - ``5``
101 - ``W``
102 - ``EVENT_DISABLE``
103 - Disable event source.
107 ---------------------
109 Defined as ``_IOWR(0xA5, 1, struct ssam_cdev_request)``.
115 Request payload data must be allocated separately and is passed in via the
125 request flags, as is done with in-kernel requests. Request flags can be set
133 the request (``-EFAULT``) or if the provided argument or any of its fields
134 are invalid (``-EINVAL``). In this case, the status value of the request
136 ``-ENOMEM`` for out-of-memory), but this value may also be zero. The IOCTL
138 submitted, and completed (i.e. handed back to user-space) successfully from
145 ----------------------------
147 Defined as ``_IOW(0xA5, 2, struct ssam_cdev_notifier_desc)``.
158 a notifier has already been registered, this IOCTL will fail with ``-EEXIST``.
164 ------------------------------
166 Defined as ``_IOW(0xA5, 3, struct ssam_cdev_notifier_desc)``.
171 fail with ``-ENOENT``.
174 --------------------------
176 Defined as ``_IOW(0xA5, 4, struct ssam_cdev_event_desc)``.
189 ---------------------------
191 Defined as ``_IOW(0xA5, 5, struct ssam_cdev_event_desc)``.
196 and forwarded to user-space after this call. The only safe way of stopping
204 .. kernel-doc:: include/uapi/linux/surface_aggregator/cdev.h