Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: docs: make CEC documents compatible with Sphinx 3.1+

Sphinx 3.x broke support for the cdomain.py extension, as the
c domain code was rewritten. Due to that, the c tags need to
be re-written, in order to use the new c domain notation.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

+63 -87
+3 -7
Documentation/userspace-api/media/cec/cec-func-close.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-close: 4 5 ··· 12 11 13 12 cec-close - Close a cec device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: int close( int fd ) 24 - :name: cec-close 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :c:func:`open() <cec-open>`. 31 - 28 + File descriptor returned by :c:func:`open()`. 32 29 33 30 Description 34 31 =========== ··· 33 36 Closes the cec device. Resources associated with the file descriptor are 34 37 freed. The device configuration remain unchanged. 35 38 36 - 37 39 Return Value 38 40 ============ 39 41 40 - :c:func:`close() <cec-close>` returns 0 on success. On error, -1 is returned, and 42 + :c:func:`close()` returns 0 on success. On error, -1 is returned, and 41 43 ``errno`` is set appropriately. Possible error codes are: 42 44 43 45 ``EBADF``
+4 -7
Documentation/userspace-api/media/cec/cec-func-ioctl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-ioctl: 4 5 ··· 19 18 20 19 #include <sys/ioctl.h> 21 20 22 - 23 - .. c:function:: int ioctl( int fd, int request, void *argp ) 24 - :name: cec-ioctl 21 + ``int ioctl(int fd, int request, void *argp)`` 25 22 26 23 Arguments 27 24 ========= 28 25 29 26 ``fd`` 30 - File descriptor returned by :c:func:`open() <cec-open>`. 27 + File descriptor returned by :c:func:`open()`. 31 28 32 29 ``request`` 33 30 CEC ioctl request code as defined in the cec.h header file, for ··· 34 35 ``argp`` 35 36 Pointer to a request-specific structure. 36 37 37 - 38 38 Description 39 39 =========== 40 40 41 - The :c:func:`ioctl() <cec-ioctl>` function manipulates cec device parameters. The 41 + The :c:func:`ioctl()` function manipulates cec device parameters. The 42 42 argument ``fd`` must be an open file descriptor. 43 43 44 44 The ioctl ``request`` code specifies the cec function to be called. It ··· 48 50 their parameters are located in the cec.h header file. All cec ioctl 49 51 requests, their respective function and parameters are specified in 50 52 :ref:`cec-user-func`. 51 - 52 53 53 54 Return Value 54 55 ============
+3 -7
Documentation/userspace-api/media/cec/cec-func-open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-open: 4 5 ··· 19 18 20 19 #include <fcntl.h> 21 20 22 - 23 21 .. c:function:: int open( const char *device_name, int flags ) 24 - :name: cec-open 25 - 26 22 27 23 Arguments 28 24 ========= ··· 40 42 41 43 Other flags have no effect. 42 44 43 - 44 45 Description 45 46 =========== 46 47 47 - To open a cec device applications call :c:func:`open() <cec-open>` with the 48 + To open a cec device applications call :c:func:`open()` with the 48 49 desired device name. The function has no side effects; the device 49 50 configuration remain unchanged. 50 51 ··· 51 54 configuration will result in an error, and ``errno`` will be set to 52 55 EBADF. 53 56 54 - 55 57 Return Value 56 58 ============ 57 59 58 - :c:func:`open() <cec-open>` returns the new file descriptor on success. On error, 60 + :c:func:`open()` returns the new file descriptor on success. On error, 59 61 -1 is returned, and ``errno`` is set appropriately. Possible error codes 60 62 include: 61 63
+5 -9
Documentation/userspace-api/media/cec/cec-func-poll.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-poll: 4 5 ··· 12 11 13 12 cec-poll - Wait for some event on a file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/poll.h> 21 21 22 - 23 22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) 24 - :name: cec-poll 25 23 26 24 Arguments 27 25 ========= ··· 33 35 ``timeout`` 34 36 Timeout to wait for events 35 37 36 - 37 38 Description 38 39 =========== 39 40 40 - With the :c:func:`poll() <cec-poll>` function applications can wait for CEC 41 + With the :c:func:`poll()` function applications can wait for CEC 41 42 events. 42 43 43 - On success :c:func:`poll() <cec-poll>` returns the number of file descriptors 44 + On success :c:func:`poll()` returns the number of file descriptors 44 45 that have been selected (that is, file descriptors for which the 45 46 ``revents`` field of the respective struct :c:type:`pollfd` 46 47 is non-zero). CEC devices set the ``POLLIN`` and ``POLLRDNORM`` flags in ··· 50 53 a value of zero, on failure it returns -1 and the ``errno`` variable is 51 54 set appropriately. 52 55 53 - For more details see the :c:func:`poll() <cec-poll>` manual page. 54 - 56 + For more details see the :c:func:`poll()` manual page. 55 57 56 58 Return Value 57 59 ============ 58 60 59 - On success, :c:func:`poll() <cec-poll>` returns the number structures which have 61 + On success, :c:func:`poll()` returns the number structures which have 60 62 non-zero ``revents`` fields, or zero if the call timed out. On error -1 61 63 is returned, and the ``errno`` variable is set appropriately: 62 64
+5 -5
Documentation/userspace-api/media/cec/cec-ioc-adap-g-caps.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_ADAP_G_CAPS: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp ) 19 - :name: CEC_ADAP_G_CAPS 17 + .. c:macro:: CEC_ADAP_G_CAPS 18 + 19 + ``int ioctl(int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp)`` 20 20 21 21 Arguments 22 22 ========= 23 23 24 24 ``fd`` 25 - File descriptor returned by :c:func:`open() <cec-open>`. 25 + File descriptor returned by :c:func:`open()`. 26 26 27 27 ``argp`` 28 - 29 28 30 29 Description 31 30 =========== ··· 62 61 - ``version`` 63 62 - CEC Framework API version, formatted with the ``KERNEL_VERSION()`` 64 63 macro. 65 - 66 64 67 65 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| 68 66
+6 -5
Documentation/userspace-api/media/cec/cec-ioc-adap-g-conn-info.rst
··· 2 2 .. 3 3 .. Copyright 2019 Google LLC 4 4 .. 5 + .. c:namespace:: CEC 6 + 5 7 .. _CEC_ADAP_G_CONNECTOR_INFO: 6 8 7 9 ******************************* ··· 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_CONNECTOR_INFO, struct cec_connector_info *argp ) 22 - :name: CEC_ADAP_G_CONNECTOR_INFO 19 + .. c:macro:: CEC_ADAP_G_CONNECTOR_INFO 20 + 21 + ``int ioctl(int fd, CEC_ADAP_G_CONNECTOR_INFO, struct cec_connector_info *argp)`` 23 22 24 23 Arguments 25 24 ========= 26 25 27 26 ``fd`` 28 - File descriptor returned by :c:func:`open() <cec-open>`. 27 + File descriptor returned by :c:func:`open()`. 29 28 30 29 ``argp`` 31 - 32 30 33 31 Description 34 32 =========== ··· 58 56 - :ref:`cec-drm-connector-info` 59 57 * - } 60 58 - 61 - 62 59 63 60 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| 64 61
+8 -12
Documentation/userspace-api/media/cec/cec-ioc-adap-g-log-addrs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_ADAP_LOG_ADDRS: 4 5 .. _CEC_ADAP_G_LOG_ADDRS: ··· 14 13 15 14 CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp ) 22 - :name: CEC_ADAP_G_LOG_ADDRS 19 + .. c:macro:: CEC_ADAP_G_LOG_ADDRS 23 20 24 - .. c:function:: int ioctl( int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp ) 25 - :name: CEC_ADAP_S_LOG_ADDRS 21 + ``int ioctl(int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp)`` 22 + 23 + .. c:macro:: CEC_ADAP_S_LOG_ADDRS 24 + 25 + ``int ioctl(int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp)`` 26 26 27 27 Arguments 28 28 ========= 29 29 30 30 ``fd`` 31 - File descriptor returned by :c:func:`open() <cec-open>`. 31 + File descriptor returned by :c:func:`open()`. 32 32 33 33 ``argp`` 34 34 Pointer to struct :c:type:`cec_log_addrs`. ··· 150 148 give the CEC framework more information about the device type, even 151 149 though the framework won't use it directly in the CEC message. 152 150 153 - 154 151 .. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}| 155 152 156 153 .. _cec-log-addrs-flags: ··· 186 185 187 186 All other messages are ignored. 188 187 189 - 190 188 .. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}| 191 189 192 190 .. _cec-versions: ··· 210 210 - ``CEC_OP_CEC_VERSION_2_0`` 211 211 - 6 212 212 - CEC version according to the HDMI 2.0 standard. 213 - 214 213 215 214 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 216 215 ··· 255 256 - ``CEC_OP_PRIM_DEVTYPE_VIDEOPROC`` 256 257 - 7 257 258 - Use for a video processor device. 258 - 259 259 260 260 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 261 261 ··· 304 306 Control). 305 307 306 308 307 - 308 309 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 309 310 310 311 .. _cec-all-dev-types-flags: ··· 343 346 - ``CEC_OP_ALL_DEVTYPE_SWITCH`` 344 347 - 0x04 345 348 - This supports the CEC Switch or Video Processing type. 346 - 347 349 348 350 349 351 Return Value
+8 -7
Documentation/userspace-api/media/cec/cec-ioc-adap-g-phys-addr.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_ADAP_PHYS_ADDR: 4 5 .. _CEC_ADAP_G_PHYS_ADDR: ··· 14 13 15 14 CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR - Get or set the physical address 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_PHYS_ADDR, __u16 *argp ) 22 - :name: CEC_ADAP_G_PHYS_ADDR 19 + .. c:macro:: CEC_ADAP_G_PHYS_ADDR 23 20 24 - .. c:function:: int ioctl( int fd, CEC_ADAP_S_PHYS_ADDR, __u16 *argp ) 25 - :name: CEC_ADAP_S_PHYS_ADDR 21 + ``int ioctl(int fd, CEC_ADAP_G_PHYS_ADDR, __u16 *argp)`` 22 + 23 + .. c:macro:: CEC_ADAP_S_PHYS_ADDR 24 + 25 + ``int ioctl(int fd, CEC_ADAP_S_PHYS_ADDR, __u16 *argp)`` 26 26 27 27 Arguments 28 28 ========= 29 29 30 30 ``fd`` 31 - File descriptor returned by :c:func:`open() <cec-open>`. 31 + File descriptor returned by :c:func:`open()`. 32 32 33 33 ``argp`` 34 34 Pointer to the CEC address. ··· 72 70 For example, the EDID for each HDMI input of the TV will have a 73 71 different physical address of the form a.0.0.0 that the sources will 74 72 read out and use as their physical address. 75 - 76 73 77 74 Return Value 78 75 ============
+5 -10
Documentation/userspace-api/media/cec/cec-ioc-dqevent.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_DQEVENT: 4 5 ··· 12 11 13 12 CEC_DQEVENT - Dequeue a CEC event 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, CEC_DQEVENT, struct cec_event *argp ) 20 - :name: CEC_DQEVENT 17 + .. c:macro:: CEC_DQEVENT 18 + 19 + ``int ioctl(int fd, CEC_DQEVENT, struct cec_event *argp)`` 21 20 22 21 Arguments 23 22 ========= 24 23 25 24 ``fd`` 26 - File descriptor returned by :c:func:`open() <cec-open>`. 25 + File descriptor returned by :c:func:`open()`. 27 26 28 27 ``argp`` 29 - 30 28 31 29 Description 32 30 =========== ··· 72 72 the HDMI driver is still configuring the device or because the HDMI 73 73 device was unbound. 74 74 75 - 76 75 .. c:type:: cec_event_lost_msgs 77 76 78 77 .. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.5cm}| ··· 92 93 the last two seconds will be stored. Since messages should be 93 94 replied to within a second according to the CEC specification, 94 95 this is more than enough. 95 - 96 96 97 97 .. tabularcolumns:: |p{1.0cm}|p{4.4cm}|p{2.5cm}|p{9.6cm}| 98 98 ··· 127 129 event. 128 130 * - } 129 131 - 130 - 131 132 132 133 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| 133 134 ··· 201 204 if the 5V is high, then an initial event will be generated for that 202 205 filehandle. 203 206 204 - 205 207 .. tabularcolumns:: |p{6.0cm}|p{0.6cm}|p{10.9cm}| 206 208 207 209 .. _cec-event-flags: ··· 224 228 - 2 225 229 - Set if one or more events of the given event type have been dropped. 226 230 This is an indication that the application cannot keep up. 227 - 228 231 229 232 230 233 Return Value
+8 -8
Documentation/userspace-api/media/cec/cec-ioc-g-mode.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_MODE: 4 5 .. _CEC_G_MODE: ··· 14 13 Synopsis 15 14 ======== 16 15 17 - .. c:function:: int ioctl( int fd, CEC_G_MODE, __u32 *argp ) 18 - :name: CEC_G_MODE 16 + .. c:macro:: CEC_G_MODE 19 17 20 - .. c:function:: int ioctl( int fd, CEC_S_MODE, __u32 *argp ) 21 - :name: CEC_S_MODE 18 + ``int ioctl(int fd, CEC_G_MODE, __u32 *argp)`` 19 + 20 + .. c:macro:: CEC_S_MODE 21 + 22 + ``int ioctl(int fd, CEC_S_MODE, __u32 *argp)`` 22 23 23 24 Arguments 24 25 ========= 25 26 26 27 ``fd`` 27 - File descriptor returned by :c:func:`open() <cec-open>`. 28 + File descriptor returned by :c:func:`open()`. 28 29 29 30 ``argp`` 30 31 Pointer to CEC mode. ··· 103 100 CEC adapter. If someone else is already the exclusive initiator 104 101 then an attempt to become one will return the ``EBUSY`` error code 105 102 error. 106 - 107 103 108 104 Available follower modes are: 109 105 ··· 195 193 the process has the ``CAP_NET_ADMIN`` capability. If that is not 196 194 set, then the ``EPERM`` error code is returned. 197 195 198 - 199 196 Core message processing details: 200 197 201 198 .. tabularcolumns:: |p{6.6cm}|p{10.9cm}| ··· 271 270 - ``CEC_MSG_REPORT_PHYSICAL_ADDR`` 272 271 - The CEC framework will make note of the reported physical address 273 272 and then just pass the message on to the follower(s). 274 - 275 273 276 274 277 275 Return Value
+8 -10
Documentation/userspace-api/media/cec/cec-ioc-receive.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_TRANSMIT: 4 5 .. _CEC_RECEIVE: ··· 13 12 14 13 CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message 15 14 16 - 17 15 Synopsis 18 16 ======== 19 17 20 - .. c:function:: int ioctl( int fd, CEC_RECEIVE, struct cec_msg \*argp ) 21 - :name: CEC_RECEIVE 18 + .. c:macro:: CEC_RECEIVE 22 19 23 - .. c:function:: int ioctl( int fd, CEC_TRANSMIT, struct cec_msg \*argp ) 24 - :name: CEC_TRANSMIT 20 + ``int ioctl(int fd, CEC_RECEIVE, struct cec_msg *argp)`` 21 + 22 + .. c:macro:: CEC_TRANSMIT 23 + 24 + ``int ioctl(int fd, CEC_TRANSMIT, struct cec_msg *argp)`` 25 25 26 26 Arguments 27 27 ========= 28 28 29 29 ``fd`` 30 - File descriptor returned by :c:func:`open() <cec-open>`. 30 + File descriptor returned by :c:func:`open()`. 31 31 32 32 ``argp`` 33 33 Pointer to struct cec_msg. ··· 196 194 supports this, otherwise it is always 0. This counter is only 197 195 valid if the :ref:`CEC_TX_STATUS_ERROR <CEC-TX-STATUS-ERROR>` status bit is set. 198 196 199 - 200 197 .. tabularcolumns:: |p{6.2cm}|p{1.0cm}|p{10.3cm}| 201 198 202 199 .. _cec-msg-flags: ··· 228 227 This flag is only allowed if the process has the ``CAP_SYS_RAWIO`` 229 228 capability. If that is not set, then the ``EPERM`` error code is 230 229 returned. 231 - 232 230 233 231 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| 234 232 ··· 298 298 - The transmit timed out. This should not normally happen and this 299 299 indicates a driver problem. 300 300 301 - 302 301 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| 303 302 304 303 .. _cec-rx-status: ··· 332 333 because the HDMI cable was disconnected, the adapter was unconfigured 333 334 or the :ref:`CEC_TRANSMIT <CEC_RECEIVE>` that waited for a 334 335 reply was interrupted. 335 - 336 336 337 337 338 338 Return Value