diff options
author | Markus Heiser <markus.heiser@darmarIT.de> | 2016-07-08 21:55:43 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-08 23:39:15 +0300 |
commit | 21c62694499800f74def88edfbd5dcd91c492b79 (patch) | |
tree | f8998e60c0400ba5475dba3685d9ac0ca1984b9d /Documentation/media/uapi/cec/cec-ioc-receive.rst | |
parent | e2460b1d579a6ea4f90cf2915da87b16b59e0082 (diff) | |
download | linux-21c62694499800f74def88edfbd5dcd91c492b79.tar.xz |
[media] doc-rst: linux_tc CEC enhanced markup
leaved content unchanged, only improved markup and references
* more man-like sections (add Name section)
* defined target for each stuct field description
* replace constant with ":ref:" to (field) description
Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/media/uapi/cec/cec-ioc-receive.rst')
-rw-r--r-- | Documentation/media/uapi/cec/cec-ioc-receive.rst | 74 |
1 files changed, 33 insertions, 41 deletions
diff --git a/Documentation/media/uapi/cec/cec-ioc-receive.rst b/Documentation/media/uapi/cec/cec-ioc-receive.rst index 5b303a1e6691..5a345ff446a7 100644 --- a/Documentation/media/uapi/cec/cec-ioc-receive.rst +++ b/Documentation/media/uapi/cec/cec-ioc-receive.rst @@ -1,21 +1,22 @@ .. -*- coding: utf-8; mode: rst -*- -.. _cec-ioc-receive: +.. _CEC_TRANSMIT: +.. _CEC_RECEIVE: ******************************* ioctl CEC_RECEIVE, CEC_TRANSMIT ******************************* -*man CEC_RECEIVE(2)* +Name +==== -CEC_TRANSMIT -Receive or transmit a CEC message +CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message Synopsis ======== -.. c:function:: int ioctl( int fd, int request, struct cec_msg *argp ) +.. cpp:function:: int ioctl( int fd, int request, struct cec_msg *argp ) Arguments ========= @@ -36,8 +37,8 @@ Note: this documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To receive a CEC message the application has to fill in the -:c:type:`struct cec_msg` structure and pass it to the ``CEC_RECEIVE`` -ioctl. ``CEC_RECEIVE`` is only available if ``CEC_CAP_RECEIVE`` is set. +:c:type:`struct cec_msg` structure and pass it to the :ref:`CEC_RECEIVE` +ioctl. :ref:`CEC_RECEIVE` is only available if ``CEC_CAP_RECEIVE`` is set. If the file descriptor is in non-blocking mode and there are no received messages pending, then it will return -1 and set errno to the EAGAIN error code. If the file descriptor is in blocking mode and ``timeout`` @@ -46,7 +47,7 @@ it will return -1 and set errno to the ETIMEDOUT error code. To send a CEC message the application has to fill in the :c:type:`struct cec_msg` structure and pass it to the -``CEC_TRANSMIT`` ioctl. ``CEC_TRANSMIT`` is only available if +:ref:`CEC_TRANSMIT` ioctl. :ref:`CEC_TRANSMIT` is only available if ``CEC_CAP_TRANSMIT`` is set. If there is no more room in the transmit queue, then it will return -1 and set errno to the EBUSY error code. @@ -66,7 +67,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - ``ts`` - Timestamp of when the message was transmitted in ns in the case of - ``CEC_TRANSMIT`` with ``reply`` set to 0, or the timestamp of the + :ref:`CEC_TRANSMIT` with ``reply`` set to 0, or the timestamp of the received message in all other cases. - .. row 2 @@ -75,9 +76,9 @@ queue, then it will return -1 and set errno to the EBUSY error code. - ``len`` - - The length of the message. For ``CEC_TRANSMIT`` this is filled in + - The length of the message. For :ref:`CEC_TRANSMIT` this is filled in by the application. The driver will fill this in for - ``CEC_RECEIVE`` and for ``CEC_TRANSMIT`` it will be filled in with + :ref:`CEC_RECEIVE` and for :ref:`CEC_TRANSMIT` it will be filled in with the length of the reply message if ``reply`` was set. - .. row 3 @@ -89,7 +90,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - The timeout in milliseconds. This is the time the device will wait for a message to be received before timing out. If it is set to 0, then it will wait indefinitely when it is called by - ``CEC_RECEIVE``. If it is 0 and it is called by ``CEC_TRANSMIT``, + :ref:`CEC_RECEIVE`. If it is 0 and it is called by :ref:`CEC_TRANSMIT`, then it will be replaced by 1000 if the ``reply`` is non-zero or ignored if ``reply`` is 0. @@ -140,9 +141,9 @@ queue, then it will return -1 and set errno to the EBUSY error code. - ``msg``\ [16] - - The message payload. For ``CEC_TRANSMIT`` this is filled in by the - application. The driver will fill this in for ``CEC_RECEIVE`` and - for ``CEC_TRANSMIT`` it will be filled in with the payload of the + - The message payload. For :ref:`CEC_TRANSMIT` this is filled in by the + application. The driver will fill this in for :ref:`CEC_RECEIVE` and + for :ref:`CEC_TRANSMIT` it will be filled in with the payload of the reply message if ``reply`` was set. - .. row 9 @@ -155,12 +156,12 @@ queue, then it will return -1 and set errno to the EBUSY error code. ``timeout`` is 0, then don't wait for a reply but return after transmitting the message. If there was an error as indicated by a non-zero ``tx_status`` field, then ``reply`` and ``timeout`` are - both set to 0 by the driver. Ignored by ``CEC_RECEIVE``. The case + both set to 0 by the driver. Ignored by :ref:`CEC_RECEIVE`. The case where ``reply`` is 0 (this is the opcode for the Feature Abort message) and ``timeout`` is non-zero is specifically allowed to send a message and wait up to ``timeout`` milliseconds for a Feature Abort reply. In this case ``rx_status`` will either be set - to ``CEC_RX_STATUS_TIMEOUT`` or ``CEC_RX_STATUS_FEATURE_ABORT``. + to :ref:`CEC_RX_STATUS_TIMEOUT <CEC_RX_STATUS_TIMEOUT>` or :ref:`CEC_RX_STATUS_FEATURE_ABORT <CEC_RX_STATUS_FEATURE_ABORT>`. - .. row 10 @@ -171,7 +172,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - A counter of the number of transmit attempts that resulted in the Arbitration Lost error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the - ``CEC_TX_STATUS_ARB_LOST`` status bit is set. + :ref:`CEC_TX_STATUS_ARB_LOST <CEC_TX_STATUS_ARB_LOST>` status bit is set. - .. row 11 @@ -182,7 +183,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - A counter of the number of transmit attempts that resulted in the Not Acknowledged error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the - ``CEC_TX_STATUS_NACK`` status bit is set. + :ref:`CEC_TX_STATUS_NACK <CEC_TX_STATUS_NACK>` status bit is set. - .. row 12 @@ -193,7 +194,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - A counter of the number of transmit attempts that resulted in the Arbitration Lost error. This is only set if the hardware supports this, otherwise it is always 0. This counter is only valid if the - ``CEC_TX_STATUS_LOW_DRIVE`` status bit is set. + :ref:`CEC_TX_STATUS_LOW_DRIVE <CEC_TX_STATUS_LOW_DRIVE>` status bit is set. - .. row 13 @@ -204,7 +205,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - A counter of the number of transmit errors other than Arbitration Lost or Not Acknowledged. This is only set if the hardware supports this, otherwise it is always 0. This counter is only - valid if the ``CEC_TX_STATUS_ERROR`` status bit is set. + valid if the :ref:`CEC_TX_STATUS_ERROR <CEC_TX_STATUS_ERROR>` status bit is set. @@ -216,18 +217,18 @@ queue, then it will return -1 and set errno to the EBUSY error code. :widths: 3 1 4 - - .. row 1 + - .. _`CEC_TX_STATUS_OK`: - ``CEC_TX_STATUS_OK`` - 0x01 - The message was transmitted successfully. This is mutually - exclusive with ``CEC_TX_STATUS_MAX_RETRIES``. Other bits can still + exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC_TX_STATUS_MAX_RETRIES>`. Other bits can still be set if earlier attempts met with failure before the transmit was eventually successful. - - .. row 2 + - .. _`CEC_TX_STATUS_ARB_LOST`: - ``CEC_TX_STATUS_ARB_LOST`` @@ -235,7 +236,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - CEC line arbitration was lost. - - .. row 3 + - .. _`CEC_TX_STATUS_NACK`: - ``CEC_TX_STATUS_NACK`` @@ -243,7 +244,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - Message was not acknowledged. - - .. row 4 + - .. _`CEC_TX_STATUS_LOW_DRIVE`: - ``CEC_TX_STATUS_LOW_DRIVE`` @@ -253,7 +254,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. follower detected an error on the bus and requests a retransmission. - - .. row 5 + - .. _`CEC_TX_STATUS_ERROR`: - ``CEC_TX_STATUS_ERROR`` @@ -264,14 +265,14 @@ queue, then it will return -1 and set errno to the EBUSY error code. error occurred, or because the hardware tested for other conditions besides those two. - - .. row 6 + - .. _`CEC_TX_STATUS_MAX_RETRIES`: - ``CEC_TX_STATUS_MAX_RETRIES`` - 0x20 - The transmit failed after one or more retries. This status bit is - mutually exclusive with ``CEC_TX_STATUS_OK``. Other bits can still + mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC_TX_STATUS_OK>`. Other bits can still be set to explain which failures were seen. @@ -284,7 +285,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. :widths: 3 1 4 - - .. row 1 + - .. _`CEC_RX_STATUS_OK`: - ``CEC_RX_STATUS_OK`` @@ -292,7 +293,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - The message was received successfully. - - .. row 2 + - .. _CEC_RX_STATUS_TIMEOUT: - ``CEC_RX_STATUS_TIMEOUT`` @@ -300,7 +301,7 @@ queue, then it will return -1 and set errno to the EBUSY error code. - The reply to an earlier transmitted message timed out. - - .. row 3 + - .. _`CEC_RX_STATUS_FEATURE_ABORT`: - ``CEC_RX_STATUS_FEATURE_ABORT`` @@ -318,12 +319,3 @@ Return Value On success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. - - -.. ------------------------------------------------------------------------------ -.. This file was automatically converted from DocBook-XML with the dbxml -.. library (https://github.com/return42/sphkerneldoc). The origin XML comes -.. from the linux kernel, refer to: -.. -.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook -.. ------------------------------------------------------------------------------ |