Commit 6aecad62 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: cec: improve cec status documentation

Clarify the description of status bits, particularly w.r.t. ERROR and NACK.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent df2b2386
...@@ -246,7 +246,10 @@ CEC_TX_STATUS_LOW_DRIVE: ...@@ -246,7 +246,10 @@ CEC_TX_STATUS_LOW_DRIVE:
CEC_TX_STATUS_ERROR: CEC_TX_STATUS_ERROR:
some unspecified error occurred: this can be one of ARB_LOST some unspecified error occurred: this can be one of ARB_LOST
or LOW_DRIVE if the hardware cannot differentiate or something or LOW_DRIVE if the hardware cannot differentiate or something
else entirely. else entirely. Some hardware only supports OK and FAIL as the
result of a transmit, i.e. there is no way to differentiate
between the different possible errors. In that case map FAIL
to CEC_TX_STATUS_NACK and not to CEC_TX_STATUS_ERROR.
CEC_TX_STATUS_MAX_RETRIES: CEC_TX_STATUS_MAX_RETRIES:
could not transmit the message after trying multiple times. could not transmit the message after trying multiple times.
......
...@@ -231,26 +231,32 @@ View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV'). ...@@ -231,26 +231,32 @@ View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV').
- ``CEC_TX_STATUS_OK`` - ``CEC_TX_STATUS_OK``
- 0x01 - 0x01
- The message was transmitted successfully. This is mutually - The message was transmitted successfully. This is mutually
exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC-TX-STATUS-MAX-RETRIES>`. Other bits can still exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC-TX-STATUS-MAX-RETRIES>`.
be set if earlier attempts met with failure before the transmit Other bits can still be set if earlier attempts met with failure before
was eventually successful. the transmit was eventually successful.
* .. _`CEC-TX-STATUS-ARB-LOST`: * .. _`CEC-TX-STATUS-ARB-LOST`:
- ``CEC_TX_STATUS_ARB_LOST`` - ``CEC_TX_STATUS_ARB_LOST``
- 0x02 - 0x02
- CEC line arbitration was lost. - CEC line arbitration was lost, i.e. another transmit started at the
same time with a higher priority. Optional status, not all hardware
can detect this error condition.
* .. _`CEC-TX-STATUS-NACK`: * .. _`CEC-TX-STATUS-NACK`:
- ``CEC_TX_STATUS_NACK`` - ``CEC_TX_STATUS_NACK``
- 0x04 - 0x04
- Message was not acknowledged. - Message was not acknowledged. Note that some hardware cannot tell apart
a 'Not Acknowledged' status from other error conditions, i.e. the result
of a transmit is just OK or FAIL. In that case this status will be
returned when the transmit failed.
* .. _`CEC-TX-STATUS-LOW-DRIVE`: * .. _`CEC-TX-STATUS-LOW-DRIVE`:
- ``CEC_TX_STATUS_LOW_DRIVE`` - ``CEC_TX_STATUS_LOW_DRIVE``
- 0x08 - 0x08
- Low drive was detected on the CEC bus. This indicates that a - Low drive was detected on the CEC bus. This indicates that a
follower detected an error on the bus and requests a follower detected an error on the bus and requests a
retransmission. retransmission. Optional status, not all hardware can detect this
error condition.
* .. _`CEC-TX-STATUS-ERROR`: * .. _`CEC-TX-STATUS-ERROR`:
- ``CEC_TX_STATUS_ERROR`` - ``CEC_TX_STATUS_ERROR``
...@@ -258,14 +264,14 @@ View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV'). ...@@ -258,14 +264,14 @@ View On' messages from initiator 0xf ('Unregistered') to destination 0 ('TV').
- Some error occurred. This is used for any errors that do not fit - Some error occurred. This is used for any errors that do not fit
``CEC_TX_STATUS_ARB_LOST`` or ``CEC_TX_STATUS_LOW_DRIVE``, either because ``CEC_TX_STATUS_ARB_LOST`` or ``CEC_TX_STATUS_LOW_DRIVE``, either because
the hardware could not tell which error occurred, or because the hardware the hardware could not tell which error occurred, or because the hardware
tested for other conditions besides those two. tested for other conditions besides those two. Optional status.
* .. _`CEC-TX-STATUS-MAX-RETRIES`: * .. _`CEC-TX-STATUS-MAX-RETRIES`:
- ``CEC_TX_STATUS_MAX_RETRIES`` - ``CEC_TX_STATUS_MAX_RETRIES``
- 0x20 - 0x20
- The transmit failed after one or more retries. This status bit is - The transmit failed after one or more retries. This status bit is
mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC-TX-STATUS-OK>`. Other bits can still mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC-TX-STATUS-OK>`.
be set to explain which failures were seen. Other bits can still be set to explain which failures were seen.
.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment