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

[media] doc-rst: update CEC_RECEIVE

The timestamp field was split into rx_ts and tx_ts, and the rx/tx_status
fields were moved. Update the doc accordingly.

Also fix a bug that stated that a non-zero tx_status field signaled an
error. That's not true, since TX_STATUS_OK is 1, not 0.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
d2cd627b ffbab694

+41 -25
+41 -25
Documentation/media/uapi/cec/cec-ioc-receive.rst
··· 64 64 65 65 - __u64 66 66 67 - - ``ts`` 67 + - ``tx_ts`` 68 68 69 - - Timestamp of when the message was transmitted in ns in the case of 70 - :ref:`CEC_TRANSMIT` with ``reply`` set to 0, or the timestamp of the 71 - received message in all other cases. 69 + - Timestamp in ns of when the last byte of the message was transmitted. 72 70 73 71 - .. row 2 72 + 73 + - __u64 74 + 75 + - ``rx_ts`` 76 + 77 + - Timestamp in ns of when the last byte of the message was received. 78 + 79 + - .. row 3 74 80 75 81 - __u32 76 82 ··· 87 81 :ref:`CEC_RECEIVE` and for :ref:`CEC_TRANSMIT` it will be filled in with 88 82 the length of the reply message if ``reply`` was set. 89 83 90 - - .. row 3 84 + - .. row 4 91 85 92 86 - __u32 93 87 ··· 100 94 then it will be replaced by 1000 if the ``reply`` is non-zero or 101 95 ignored if ``reply`` is 0. 102 96 103 - - .. row 4 97 + - .. row 5 104 98 105 99 - __u32 106 100 ··· 111 105 framework to generate an event if a reply for a message was 112 106 requested and the message was transmitted in a non-blocking mode. 113 107 114 - - .. row 5 108 + - .. row 6 115 109 116 110 - __u32 117 111 118 112 - ``flags`` 119 113 120 114 - Flags. No flags are defined yet, so set this to 0. 121 - 122 - - .. row 6 123 - 124 - - __u8 125 - 126 - - ``rx_status`` 127 - 128 - - The status bits of the received message. See 129 - :ref:`cec-rx-status` for the possible status values. It is 0 if 130 - this message was transmitted, not received, unless this is the 131 - reply to a transmitted message. In that case both ``rx_status`` 132 - and ``tx_status`` are set. 133 115 134 116 - .. row 7 135 117 ··· 140 146 for :ref:`CEC_TRANSMIT` it will be filled in with the payload of the 141 147 reply message if ``reply`` was set. 142 148 143 - - .. row 9 149 + - .. row 8 144 150 145 151 - __u8 146 152 ··· 148 154 149 155 - Wait until this message is replied. If ``reply`` is 0 and the 150 156 ``timeout`` is 0, then don't wait for a reply but return after 151 - transmitting the message. If there was an error as indicated by a 152 - non-zero ``tx_status`` field, then ``reply`` and ``timeout`` are 157 + transmitting the message. If there was an error as indicated by the 158 + ``tx_status`` field, then ``reply`` and ``timeout`` are 153 159 both set to 0 by the driver. Ignored by :ref:`CEC_RECEIVE`. The case 154 160 where ``reply`` is 0 (this is the opcode for the Feature Abort 155 161 message) and ``timeout`` is non-zero is specifically allowed to ··· 157 163 Feature Abort reply. In this case ``rx_status`` will either be set 158 164 to :ref:`CEC_RX_STATUS_TIMEOUT <CEC-RX-STATUS-TIMEOUT>` or :ref:`CEC_RX_STATUS-FEATURE-ABORT <CEC-RX-STATUS-FEATURE-ABORT>`. 159 165 166 + - .. row 9 167 + 168 + - __u8 169 + 170 + - ``rx_status`` 171 + 172 + - The status bits of the received message. See 173 + :ref:`cec-rx-status` for the possible status values. It is 0 if 174 + this message was transmitted, not received, unless this is the 175 + reply to a transmitted message. In that case both ``rx_status`` 176 + and ``tx_status`` are set. 177 + 160 178 - .. row 10 179 + 180 + - __u8 181 + 182 + - ``tx_status`` 183 + 184 + - The status bits of the transmitted message. See 185 + :ref:`cec-tx-status` for the possible status values. It is 0 if 186 + this messages was received, not transmitted. 187 + 188 + - .. row 11 161 189 162 190 - __u8 163 191 ··· 190 174 this, otherwise it is always 0. This counter is only valid if the 191 175 :ref:`CEC_TX_STATUS_ARB_LOST <CEC-TX-STATUS-ARB-LOST>` status bit is set. 192 176 193 - - .. row 11 177 + - .. row 12 194 178 195 179 - __u8 196 180 ··· 201 185 this, otherwise it is always 0. This counter is only valid if the 202 186 :ref:`CEC_TX_STATUS_NACK <CEC-TX-STATUS-NACK>` status bit is set. 203 187 204 - - .. row 12 188 + - .. row 13 205 189 206 190 - __u8 207 191 ··· 212 196 this, otherwise it is always 0. This counter is only valid if the 213 197 :ref:`CEC_TX_STATUS_LOW_DRIVE <CEC-TX-STATUS-LOW-DRIVE>` status bit is set. 214 198 215 - - .. row 13 199 + - .. row 14 216 200 217 201 - __u8 218 202