Documentation/driver-api/surface_aggregator/clients/cdev.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API

Surface Aggregator User-Space EC Interface (cdev)

Surface Aggregator 개발·debugging용 misc-device의 synchronous request, per-client notifier, global event reference counting, 다섯 IOCTL과 오류 반환 계약을 설명하는 전문 번역입니다.

Source pathDocumentation/driver-api/surface_aggregator/clients/cdev.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

cdev.rst:1-204

`surface_aggregator_cdev`는 개발과 debugging을 위한 수동-load misc-device입니다. Request IOCTL은 setup 결과와 실제 SAM request status를 분리합니다. Notifier는 device-file instance별로 event를 전달하지만 event source enable은 controller 전체에서 reference-count됩니다. File close는 notifier를 제거해도 event를 자동 disable하지 않으므로 client가 enable·disable 균형을 직접 지켜야 합니다.

문서 구성
원문 줄내용
1-27Interface 목적·device file·UAPI header
28-59Event 수신과 local/global scope
60-105Controller IOCTL 표
106-143Synchronous request와 이중 status
144-172Notifier 등록·해제
173-204Event enable·disable과 UAPI type

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0+
2
3 .. |ssam_cdev_request| replace:: :c:type:`struct ssam_cdev_request <ssam_cdev_request>`
4 .. |ssam_cdev_request_flags| replace:: :c:type:`enum ssam_cdev_request_flags <ssam_cdev_request_flags>`
5 .. |ssam_cdev_event| replace:: :c:type:`struct ssam_cdev_event <ssam_cdev_event>`
6
7 ==============================
8 User-Space EC Interface (cdev)
9 ==============================
10
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
13 the SAM EC. It is intended to be used for development and debugging, and
14 therefore should not be used or relied upon in any other way. Note that this
15 module is not loaded automatically, but instead must be loaded manually.
16
17 The provided interface is accessible through the ``/dev/surface/aggregator``
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
20 ``include/uapi/linux/surface_aggregator/cdev.h``.
21
22 A small python library and scripts for accessing this interface can be found
23 at https://github.com/linux-surface/surface-aggregator-module/tree/master/scripts/ssam.
24
25 .. contents::
26
27
28 Receiving Events
29 ================
30
31 Events can be received by reading from the device-file. The are represented by
32 the |ssam_cdev_event| datatype.
33
34 Before events are available to be read, however, the desired notifiers must be
35 registered via the ``SSAM_CDEV_NOTIF_REGISTER`` IOCTL. Notifiers are, in
36 essence, callbacks, called when the EC sends an event. They are, in this
37 interface, associated with a specific target category and device-file-instance.
38 They forward any event of this category to the buffer of the corresponding
39 instance, from which it can then be read.
40
41 Notifiers themselves do not enable events on the EC. Thus, it may additionally
42 be necessary to enable events via the ``SSAM_CDEV_EVENT_ENABLE`` IOCTL. While
43 notifiers work per-client (i.e. per-device-file-instance), events are enabled
44 globally, for the EC and all of its clients (regardless of userspace or
45 non-userspace). The ``SSAM_CDEV_EVENT_ENABLE`` and ``SSAM_CDEV_EVENT_DISABLE``
46 IOCTLs take care of reference counting the events, such that an event is
47 enabled as long as there is a client that has requested it.
48
49 Note that enabled events are not automatically disabled once the client
50 instance is closed. Therefore any client process (or group of processes) should
51 balance their event enable calls with the corresponding event disable calls. It
52 is, however, perfectly valid to enable and disable events on different client
53 instances. For example, it is valid to set up notifiers and read events on
54 client instance ``A``, enable those events on instance ``B`` (note that these
55 will also be received by A since events are enabled/disabled globally), and
56 after no more events are desired, disable the previously enabled events via
57 instance ``C``.
58
59
60 Controller IOCTLs
61 =================
62
63 The following IOCTLs are provided:
64
65 .. flat-table:: Controller IOCTLs
66 :widths: 1 1 1 1 4
67 :header-rows: 1
68
69 * - Type
70 - Number
71 - Direction
72 - Name
73 - Description
74
75 * - ``0xA5``
76 - ``1``
77 - ``WR``
78 - ``REQUEST``
79 - Perform synchronous SAM request.
80
81 * - ``0xA5``
82 - ``2``
83 - ``W``
84 - ``NOTIF_REGISTER``
85 - Register event notifier.
86
87 * - ``0xA5``
88 - ``3``
89 - ``W``
90 - ``NOTIF_UNREGISTER``
91 - Unregister event notifier.
92
93 * - ``0xA5``
94 - ``4``
95 - ``W``
96 - ``EVENT_ENABLE``
97 - Enable event source.
98
99 * - ``0xA5``
100 - ``5``
101 - ``W``
102 - ``EVENT_DISABLE``
103 - Disable event source.
104
105
106 ``SSAM_CDEV_REQUEST``
107 ---------------------
108
109 Defined as ``_IOWR(0xA5, 1, struct ssam_cdev_request)``.
110
111 Executes a synchronous SAM request. The request specification is passed in
112 as argument of type |ssam_cdev_request|, which is then written to/modified
113 by the IOCTL to return status and result of the request.
114
115 Request payload data must be allocated separately and is passed in via the
116 ``payload.data`` and ``payload.length`` members. If a response is required,
117 the response buffer must be allocated by the caller and passed in via the
118 ``response.data`` member. The ``response.length`` member must be set to the
119 capacity of this buffer, or if no response is required, zero. Upon
120 completion of the request, the call will write the response to the response
121 buffer (if its capacity allows it) and overwrite the length field with the
122 actual size of the response, in bytes.
123
124 Additionally, if the request has a response, this must be indicated via the
125 request flags, as is done with in-kernel requests. Request flags can be set
126 via the ``flags`` member and the values correspond to the values found in
127 |ssam_cdev_request_flags|.
128
129 Finally, the status of the request itself is returned in the ``status``
130 member (a negative errno value indicating failure). Note that failure
131 indication of the IOCTL is separated from failure indication of the request:
132 The IOCTL returns a negative status code if anything failed during setup of
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
135 argument may be set, providing more detail on what went wrong (e.g.
136 ``-ENOMEM`` for out-of-memory), but this value may also be zero. The IOCTL
137 will return with a zero status code in case the request has been set up,
138 submitted, and completed (i.e. handed back to user-space) successfully from
139 inside the IOCTL, but the request ``status`` member may still be negative in
140 case the actual execution of the request failed after it has been submitted.
141
142 A full definition of the argument struct is provided below.
143
144 ``SSAM_CDEV_NOTIF_REGISTER``
145 ----------------------------
146
147 Defined as ``_IOW(0xA5, 2, struct ssam_cdev_notifier_desc)``.
148
149 Register a notifier for the event target category specified in the given
150 notifier description with the specified priority. Notifiers registration is
151 required to receive events, but does not enable events themselves. After a
152 notifier for a specific target category has been registered, all events of that
153 category will be forwarded to the userspace client and can then be read from
154 the device file instance. Note that events may have to be enabled, e.g. via the
155 ``SSAM_CDEV_EVENT_ENABLE`` IOCTL, before the EC will send them.
156
157 Only one notifier can be registered per target category and client instance. If
158 a notifier has already been registered, this IOCTL will fail with ``-EEXIST``.
159
160 Notifiers will automatically be removed when the device file instance is
161 closed.
162
163 ``SSAM_CDEV_NOTIF_UNREGISTER``
164 ------------------------------
165
166 Defined as ``_IOW(0xA5, 3, struct ssam_cdev_notifier_desc)``.
167
168 Unregisters the notifier associated with the specified target category. The
169 priority field will be ignored by this IOCTL. If no notifier has been
170 registered for this client instance and the given category, this IOCTL will
171 fail with ``-ENOENT``.
172
173 ``SSAM_CDEV_EVENT_ENABLE``
174 --------------------------
175
176 Defined as ``_IOW(0xA5, 4, struct ssam_cdev_event_desc)``.
177
178 Enable the event associated with the given event descriptor.
179
180 Note that this call will not register a notifier itself, it will only enable
181 events on the controller. If you want to receive events by reading from the
182 device file, you will need to register the corresponding notifier(s) on that
183 instance.
184
185 Events are not automatically disabled when the device file is closed. This must
186 be done manually, via a call to the ``SSAM_CDEV_EVENT_DISABLE`` IOCTL.
187
188 ``SSAM_CDEV_EVENT_DISABLE``
189 ---------------------------
190
191 Defined as ``_IOW(0xA5, 5, struct ssam_cdev_event_desc)``.
192
193 Disable the event associated with the given event descriptor.
194
195 Note that this will not unregister any notifiers. Events may still be received
196 and forwarded to user-space after this call. The only safe way of stopping
197 events from being received is unregistering all previously registered
198 notifiers.
199
200
201 Structures and Enums
202 ====================
203
204 .. kernel-doc:: include/uapi/linux/surface_aggregator/cdev.h
205

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

User-space EC character device 개요

1-27

`surface_aggregator_cdev` module은 user-space에서 SAM EC로 어느 정도 직접 연결할 수 있도록 SSAM controller용 misc-device를 제공합니다.

이 interface는 개발과 debugging 용도이며 다른 목적으로 사용하거나 의존해서는 안 됩니다. Module은 자동으로 load되지 않으므로 수동으로 load해야 합니다.

Interface는 `/dev/surface/aggregator` device file에서 접근합니다. 모든 기능은 IOCTL로 제공하며 IOCTL과 input/output parameter 구조체는 `include/uapi/linux/surface_aggregator/cdev.h`에 정의되어 있습니다.

이 interface에 접근하는 작은 Python library와 script는 linux-surface의 `surface-aggregator-module/scripts/ssam` repository 경로에서 찾을 수 있습니다.

Surface Aggregator cdev interface
항목
Module`surface_aggregator_cdev`
Device file`/dev/surface/aggregator`
PurposeDevelopment and debugging
LoadingManual
OperationsIOCTL
UAPI header`include/uapi/linux/surface_aggregator/cdev.h`

.. SPDX-License-Identifier: GPL-2.0+

.. |ssam_cdev_request| replace:: :c:type:`struct ssam_cdev_request <ssam_cdev_request>`
.. |ssam_cdev_request_flags| replace:: :c:type:`enum ssam_cdev_request_flags <ssam_cdev_request_flags>`
.. |ssam_cdev_event| replace:: :c:type:`struct ssam_cdev_event <ssam_cdev_event>`

==============================
User-Space EC Interface (cdev)
==============================

The ``surface_aggregator_cdev`` module provides a misc-device for the SSAM
controller to allow for a (more or less) direct connection from user-space to
the SAM EC. It is intended to be used for development and debugging, and
therefore should not be used or relied upon in any other way. Note that this
module is not loaded automatically, but instead must be loaded manually.

The provided interface is accessible through the ``/dev/surface/aggregator``
device-file. All functionality of this interface is provided via IOCTLs.
These IOCTLs and their respective input/output parameter structs are defined in
``include/uapi/linux/surface_aggregator/cdev.h``.

A small python library and scripts for accessing this interface can be found
at https://github.com/linux-surface/surface-aggregator-module/tree/master/scripts/ssam.

.. contents::

Event 수신과 global enable 상태

28-59

Event는 device file을 `read`하여 수신하고 `struct ssam_cdev_event` datatype으로 표현합니다.

Event를 읽기 전에 원하는 notifier를 `SSAM_CDEV_NOTIF_REGISTER` IOCTL로 등록해야 합니다. Notifier는 EC가 event를 보낼 때 호출되는 callback에 해당하며 이 interface에서는 특정 target category와 device-file instance에 연결됩니다. 해당 category의 event를 대응 instance의 buffer로 전달하면 그 instance에서 읽을 수 있습니다.

Notifier 자체는 EC에서 event를 enable하지 않습니다. 필요하면 `SSAM_CDEV_EVENT_ENABLE` IOCTL을 별도로 호출해야 합니다.

Notifier는 client별, 즉 device-file instance별로 동작하지만 event enable 상태는 user-space와 non-userspace client를 모두 포함한 EC 전체에 global하게 적용됩니다. `SSAM_CDEV_EVENT_ENABLE`과 `SSAM_CDEV_EVENT_DISABLE`은 event를 reference count하여 요청한 client가 하나라도 있는 동안 enable 상태를 유지합니다.

Client instance를 닫아도 enable된 event는 자동으로 disable되지 않습니다. 각 client process 또는 process group은 event enable 호출과 대응 disable 호출의 균형을 맞춰야 합니다.

Enable과 disable은 서로 다른 client instance에서 수행해도 됩니다. 예를 들어 instance A에 notifier를 두고 event를 읽으면서 B에서 global event를 enable하고, 더 이상 필요하지 않을 때 C에서 disable할 수 있습니다.

Notifier와 event enable scope
Instance A`NOTIF_REGISTER`Category event buffer`read()`
Instance B`EVENT_ENABLE`Global EC event reference count +1
Instance C`EVENT_DISABLE`Global EC event reference count -1
Close file instanceNotifier auto-removeEvent is not auto-disabled

Event forwarding은 file instance별이지만 EC event source의 enable 상태는 controller 전체에서 공유됩니다.

Receiving Events
================

Events can be received by reading from the device-file. The are represented by
the |ssam_cdev_event| datatype.

Before events are available to be read, however, the desired notifiers must be
registered via the ``SSAM_CDEV_NOTIF_REGISTER`` IOCTL. Notifiers are, in
essence, callbacks, called when the EC sends an event. They are, in this
interface, associated with a specific target category and device-file-instance.
They forward any event of this category to the buffer of the corresponding
instance, from which it can then be read.

Notifiers themselves do not enable events on the EC. Thus, it may additionally
be necessary to enable events via the ``SSAM_CDEV_EVENT_ENABLE`` IOCTL. While
notifiers work per-client (i.e. per-device-file-instance), events are enabled
globally, for the EC and all of its clients (regardless of userspace or
non-userspace). The ``SSAM_CDEV_EVENT_ENABLE`` and ``SSAM_CDEV_EVENT_DISABLE``
IOCTLs take care of reference counting the events, such that an event is
enabled as long as there is a client that has requested it.

Note that enabled events are not automatically disabled once the client
instance is closed. Therefore any client process (or group of processes) should
balance their event enable calls with the corresponding event disable calls. It
is, however, perfectly valid to enable and disable events on different client
instances. For example, it is valid to set up notifiers and read events on
client instance ``A``, enable those events on instance ``B`` (note that these
will also be received by A since events are enabled/disabled globally), and
after no more events are desired, disable the previously enabled events via
instance ``C``.

Controller IOCTL 목록

60-105

Controller interface는 type `0xA5` 아래 다섯 IOCTL을 제공합니다. `REQUEST`만 read/write 방향인 `WR`이고 나머지는 write 방향인 `W`입니다.

Controller IOCTLs
TypeNumberDirectionName설명
0xA51WRREQUESTSynchronous SAM request 수행
0xA52WNOTIF_REGISTEREvent notifier 등록
0xA53WNOTIF_UNREGISTEREvent notifier 해제
0xA54WEVENT_ENABLEEvent source enable
0xA55WEVENT_DISABLEEvent source disable

Controller IOCTLs
=================

The following IOCTLs are provided:

.. flat-table:: Controller IOCTLs
   :widths: 1 1 1 1 4
   :header-rows: 1

   * - Type
     - Number
     - Direction
     - Name
     - Description

   * - ``0xA5``
     - ``1``
     - ``WR``
     - ``REQUEST``
     - Perform synchronous SAM request.

   * - ``0xA5``
     - ``2``
     - ``W``
     - ``NOTIF_REGISTER``
     - Register event notifier.

   * - ``0xA5``
     - ``3``
     - ``W``
     - ``NOTIF_UNREGISTER``
     - Unregister event notifier.

   * - ``0xA5``
     - ``4``
     - ``W``
     - ``EVENT_ENABLE``
     - Enable event source.

   * - ``0xA5``
     - ``5``
     - ``W``
     - ``EVENT_DISABLE``
     - Disable event source.

SSAM_CDEV_REQUEST

106-143

`SSAM_CDEV_REQUEST`는 `_IOWR(0xA5, 1, struct ssam_cdev_request)`로 정의되며 synchronous SAM request를 실행합니다. `struct ssam_cdev_request` argument는 request specification을 전달하고, IOCTL이 status와 결과를 돌려주도록 다시 씁니다.

Request payload는 별도로 allocate하여 `payload.data`와 `payload.length`로 전달합니다. Response가 필요하면 caller가 response buffer를 allocate하여 `response.data`로 넘기고 `response.length`에는 buffer capacity를 설정합니다. Response가 필요 없으면 length를 0으로 둡니다.

Request 완료 시 capacity가 충분하면 response buffer에 결과를 쓰고 `response.length`를 실제 byte 수로 덮어씁니다. Response가 있는 request는 in-kernel request와 마찬가지로 `flags`에 `enum ssam_cdev_request_flags` 값을 설정하여 이를 표시해야 합니다.

실제 request status는 `status` member에 반환되고 음수 errno는 실패를 나타냅니다. 이는 IOCTL 자체의 실패와 구분됩니다.

IOCTL은 request setup 중 fault가 나면 `-EFAULT`, argument 또는 field가 잘못되면 `-EINVAL`을 반환합니다. 이 경우 request의 `status`가 `-ENOMEM` 같은 세부 원인을 담을 수도 있지만 0일 수도 있습니다.

Request가 setup·submit·complete되어 user-space로 정상 반환되면 IOCTL status는 0입니다. 그러나 submit 뒤 실제 request 실행이 실패했다면 내부 `status` member는 여전히 음수일 수 있습니다.

REQUEST 결과 경로
결과 위치의미대표 값
IOCTL returnSetup·argument·copy 단계`-EFAULT`, `-EINVAL`, 0
request.status실제 SAM request 실행음수 errno 또는 0
response.length 입력Buffer capacityBytes
response.length 출력실제 response 크기Bytes
flagsResponse 존재 여부 등`ssam_cdev_request_flags`

``SSAM_CDEV_REQUEST``
---------------------

Defined as ``_IOWR(0xA5, 1, struct ssam_cdev_request)``.

Executes a synchronous SAM request. The request specification is passed in
as argument of type |ssam_cdev_request|, which is then written to/modified
by the IOCTL to return status and result of the request.

Request payload data must be allocated separately and is passed in via the
``payload.data`` and ``payload.length`` members. If a response is required,
the response buffer must be allocated by the caller and passed in via the
``response.data`` member. The ``response.length`` member must be set to the
capacity of this buffer, or if no response is required, zero. Upon
completion of the request, the call will write the response to the response
buffer (if its capacity allows it) and overwrite the length field with the
actual size of the response, in bytes.

Additionally, if the request has a response, this must be indicated via the
request flags, as is done with in-kernel requests. Request flags can be set
via the ``flags`` member and the values correspond to the values found in
|ssam_cdev_request_flags|.

Finally, the status of the request itself is returned in the ``status``
member (a negative errno value indicating failure). Note that failure
indication of the IOCTL is separated from failure indication of the request:
The IOCTL returns a negative status code if anything failed during setup of
the request (``-EFAULT``) or if the provided argument or any of its fields
are invalid (``-EINVAL``). In this case, the status value of the request
argument may be set, providing more detail on what went wrong (e.g.
``-ENOMEM`` for out-of-memory), but this value may also be zero. The IOCTL
will return with a zero status code in case the request has been set up,
submitted, and completed (i.e. handed back to user-space) successfully from
inside the IOCTL, but the request ``status`` member may still be negative in
case the actual execution of the request failed after it has been submitted.

A full definition of the argument struct is provided below.

SSAM_CDEV_NOTIF_REGISTER

144-162

`SSAM_CDEV_NOTIF_REGISTER`는 `_IOW(0xA5, 2, struct ssam_cdev_notifier_desc)`로 정의됩니다.

주어진 notifier description의 event target category와 priority로 notifier를 등록합니다. Event를 받으려면 notifier 등록이 필요하지만 등록 자체가 event를 enable하지는 않습니다.

특정 target category notifier를 등록하면 그 category의 모든 event가 user-space client로 전달되어 해당 device file instance에서 읽을 수 있습니다. EC가 event를 보내도록 하려면 `SSAM_CDEV_EVENT_ENABLE`을 별도로 호출해야 할 수 있습니다.

Target category와 client instance 조합마다 notifier는 하나만 등록할 수 있습니다. 이미 등록되어 있으면 `-EEXIST`로 실패합니다. Device file instance를 닫으면 notifier는 자동 제거됩니다.

Notifier 등록 규칙
항목동작
ScopeTarget category + client file instance
PriorityNotifier description에서 지정
Duplicate`-EEXIST`
Event enable별도 `EVENT_ENABLE` 필요
File closeNotifier 자동 제거

``SSAM_CDEV_NOTIF_REGISTER``
----------------------------

Defined as ``_IOW(0xA5, 2, struct ssam_cdev_notifier_desc)``.

Register a notifier for the event target category specified in the given
notifier description with the specified priority. Notifiers registration is
required to receive events, but does not enable events themselves. After a
notifier for a specific target category has been registered, all events of that
category will be forwarded to the userspace client and can then be read from
the device file instance. Note that events may have to be enabled, e.g. via the
``SSAM_CDEV_EVENT_ENABLE`` IOCTL, before the EC will send them.

Only one notifier can be registered per target category and client instance. If
a notifier has already been registered, this IOCTL will fail with ``-EEXIST``.

Notifiers will automatically be removed when the device file instance is
closed.

SSAM_CDEV_NOTIF_UNREGISTER

163-172

`SSAM_CDEV_NOTIF_UNREGISTER`는 `_IOW(0xA5, 3, struct ssam_cdev_notifier_desc)`로 정의됩니다.

지정한 target category와 연결된 notifier를 해제하며 priority field는 무시합니다. 해당 client instance와 category에 등록된 notifier가 없으면 `-ENOENT`로 실패합니다.

Notifier 해제
입력처리
Target category대응 notifier 선택
Priority무시
등록 없음`-ENOENT`

``SSAM_CDEV_NOTIF_UNREGISTER``
------------------------------

Defined as ``_IOW(0xA5, 3, struct ssam_cdev_notifier_desc)``.

Unregisters the notifier associated with the specified target category. The
priority field will be ignored by this IOCTL. If no notifier has been
registered for this client instance and the given category, this IOCTL will
fail with ``-ENOENT``.

SSAM_CDEV_EVENT_ENABLE

173-187

`SSAM_CDEV_EVENT_ENABLE`은 `_IOW(0xA5, 4, struct ssam_cdev_event_desc)`로 정의되며 주어진 event descriptor에 해당하는 event를 enable합니다.

이 호출은 notifier를 등록하지 않고 controller의 event만 enable합니다. Device file을 읽어 event를 받으려면 해당 instance에 대응 notifier를 따로 등록해야 합니다.

Device file을 닫아도 event는 자동으로 disable되지 않습니다. `SSAM_CDEV_EVENT_DISABLE` IOCTL을 수동으로 호출해야 합니다.

Event 수신 준비
`EVENT_ENABLE`Controller event source enabled
`NOTIF_REGISTER` on instanceForward matching event to file buffer`read()`
File closeNotifier removedEvent source remains enabled

Global event source enable과 instance-local notifier 등록이 모두 있어야 해당 client가 event를 읽을 수 있습니다.

``SSAM_CDEV_EVENT_ENABLE``
--------------------------

Defined as ``_IOW(0xA5, 4, struct ssam_cdev_event_desc)``.

Enable the event associated with the given event descriptor.

Note that this call will not register a notifier itself, it will only enable
events on the controller. If you want to receive events by reading from the
device file, you will need to register the corresponding notifier(s) on that
instance.

Events are not automatically disabled when the device file is closed. This must
be done manually, via a call to the ``SSAM_CDEV_EVENT_DISABLE`` IOCTL.

SSAM_CDEV_EVENT_DISABLE과 UAPI 정의

188-204

`SSAM_CDEV_EVENT_DISABLE`은 `_IOW(0xA5, 5, struct ssam_cdev_event_desc)`로 정의되며 주어진 event descriptor의 event를 disable합니다.

이 호출은 notifier를 해제하지 않습니다. Reference count나 다른 source 상태에 따라 호출 뒤에도 event가 수신되어 user-space로 전달될 수 있습니다. Event 수신을 확실히 멈추는 유일한 방법은 이전에 등록한 notifier를 모두 해제하는 것입니다.

마지막 `kernel-doc` 지시문은 `include/uapi/linux/surface_aggregator/cdev.h`에서 이 interface의 structure와 enum 정의를 포함합니다.

Disable 이후 남는 상태
동작영향
`EVENT_DISABLE`Global event enable reference 감소
Registered notifier유지됨
Possible forwarding다른 enable source가 있으면 계속될 수 있음
확실한 수신 중단모든 notifier unregister
UAPI types`include/uapi/linux/surface_aggregator/cdev.h`

``SSAM_CDEV_EVENT_DISABLE``
---------------------------

Defined as ``_IOW(0xA5, 5, struct ssam_cdev_event_desc)``.

Disable the event associated with the given event descriptor.

Note that this will not unregister any notifiers. Events may still be received
and forwarded to user-space after this call. The only safe way of stopping
events from being received is unregistering all previously registered
notifiers.


Structures and Enums
====================

.. kernel-doc:: include/uapi/linux/surface_aggregator/cdev.h