Lines Matching +full:op +full:- +full:mode

1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
9 has low-level support for the CEC bus. Most hardware today will have
10 high-level CEC support where the hardware deals with driving the CEC bus,
19 Currently only the cec-gpio driver (when the CEC line is directly
20 connected to a pull-up GPIO line) and the AllWinner A10/A20 drm driver
25 now an ``error-inj`` file.
32 With ``cat error-inj`` you can see both the possible commands and the current
35 $ cat /sys/kernel/debug/cec/cec0/error-inj
38 # rx-clear clear all rx error injections
39 # tx-clear clear all tx error injections
40 # <op> clear clear all rx and tx error injections for <op>
41 # <op> rx-clear clear all rx error injections for <op>
42 # <op> tx-clear clear all tx error injections for <op>
45 # rx-no-low-drive do not generate low-drive pulses
48 # <op>[,<mode>] rx-nack NACK the message instead of sending an ACK
49 # <op>[,<mode>] rx-low-drive <bit> force a low-drive condition at this bit position
50 # <op>[,<mode>] rx-add-byte add a spurious byte to the received CEC message
51 # <op>[,<mode>] rx-remove-byte remove the last byte from the received CEC message
52 # any[,<mode>] rx-arb-lost [<poll>] generate a POLL message to trigger an arbitration lost
55 # tx-ignore-nack-until-eom ignore early NACKs until EOM
56 # tx-custom-low-usecs <usecs> define the 'low' time for the custom pulse
57 # tx-custom-high-usecs <usecs> define the 'high' time for the custom pulse
58 # tx-custom-pulse transmit the custom pulse once the bus is idle
59 # tx-glitch-low-usecs <usecs> define the 'low' time for the glitch pulse
60 # tx-glitch-high-usecs <usecs> define the 'high' time for the glitch pulse
61 # tx-glitch-falling-edge send the glitch pulse after every falling edge
62 # tx-glitch-rising-edge send the glitch pulse after every rising edge
65 # <op>[,<mode>] tx-no-eom don't set the EOM bit
66 # <op>[,<mode>] tx-early-eom set the EOM bit one byte too soon
67 # <op>[,<mode>] tx-add-bytes <num> append <num> (1-255) spurious bytes to the message
68 # <op>[,<mode>] tx-remove-byte drop the last byte from the message
69 # <op>[,<mode>] tx-short-bit <bit> make this bit shorter than allowed
70 # <op>[,<mode>] tx-long-bit <bit> make this bit longer than allowed
71 # <op>[,<mode>] tx-custom-bit <bit> send the custom pulse instead of this bit
72 # <op>[,<mode>] tx-short-start send a start pulse that's too short
73 # <op>[,<mode>] tx-long-start send a start pulse that's too long
74 # <op>[,<mode>] tx-custom-start send the custom pulse instead of the start pulse
75 # <op>[,<mode>] tx-last-bit <bit> stop sending after this bit
76 # <op>[,<mode>] tx-low-drive <bit> force a low-drive condition at this bit position
78 # <op> CEC message opcode (0-255) or 'any'
79 # <mode> 'once' (default), 'always', 'toggle' or 'off'
80 # <bit> CEC message bit (0-159)
81 # 10 bits per 'byte': bits 0-7: data, bit 8: EOM, bit 9: ACK
82 # <poll> CEC poll message used to test arbitration lost (0x00-0xff, default 0x0f)
83 # <usecs> microseconds (0-10000000, default 1000)
87 You can write error injection commands to ``error-inj`` using
88 ``echo 'cmd' >error-inj`` or ``cat cmd.txt >error-inj``. The ``cat error-inj``
90 and use it as an input to ``error-inj`` later.
93 ------------
105 all opcodes (``any``). Each command also has a 'mode' which can be ``off``
112 So '``any rx-nack``' will NACK the next received CEC message,
113 '``any,always rx-nack``' will NACK all received CEC messages and
114 '``0x82,toggle rx-nack``' will only NACK if an Active Source message was
117 After an error was injected with mode ``once`` the error injection command
118 is cleared automatically, so ``once`` is a one-time deal.
120 All combinations of ``<op>`` and error injection commands can co-exist. So
123 0x9e tx-add-bytes 1
124 0x9e tx-early-eom
125 0x9f tx-add-bytes 2
126 any rx-nack
130 However, if the same ``<op>`` and command combination is specified,
133 0x9e tx-add-bytes 1
134 0x9e tx-add-bytes 2
139 ----------------------
144 ``rx-clear``
147 ``tx-clear``
150 ``<op> clear``
153 ``<op> rx-clear``
156 ``<op> tx-clear``
160 ----------------
162 ``<op>[,<mode>] rx-nack``
167 ``<op>[,<mode>] rx-low-drive <bit>``
168 Force a Low Drive condition at this bit position. If <op> specifies
176 ``<op>[,<mode>] rx-add-byte``
179 the high-level protocol since spurious bytes should be ignored.
181 ``<op>[,<mode>] rx-remove-byte``
183 was at least 2 bytes long. This is useful to test the high-level
186 ``<op>[,<mode>] rx-arb-lost <poll>``
188 This command is only allowed for ``<op>`` values of ``next`` or ``all``.
190 to transmit mode and it will transmit a POLL message. By default this is
203 ``rx-no-low-drive``
212 -----------------
214 ``tx-ignore-nack-until-eom``
225 ``<op>[,<mode>] tx-no-eom``
227 (End-Of-Message) bit set. With this command the transmit will just stop
229 handles this case. Normally receivers have a time-out after which
232 ``<op>[,<mode>] tx-early-eom``
234 of two bytes or more. The EOM bit will be set for the second-to-last byte
240 ``<op>[,<mode>] tx-add-bytes <num>``
241 Append ``<num>`` (1-255) spurious bytes to the message. The extra bytes
251 ``<op>[,<mode>] tx-remove-byte``
255 ``<op>[,<mode>] tx-short-bit <bit>``
257 an Ack bit. If <op> specifies a specific CEC opcode then the bit position
268 sees a too-short 0 bit.
270 ``<op>[,<mode>] tx-long-bit <bit>``
272 an Ack bit. If <op> specifies a specific CEC opcode then the bit position
286 sees a too-long 0 bit.
288 ``<op>[,<mode>] tx-short-start``
295 ``<op>[,<mode>] tx-long-start``
307 ``<op>[,<mode>] tx-last-bit <bit>``
308 Just stop transmitting after this bit. If <op> specifies a specific CEC
314 ``<op>[,<mode>] tx-low-drive <bit>``
315 Force a Low Drive condition at this bit position. If <op> specifies a
319 positions 0-3 the receiver can interpret this as an Arbitration Lost
323 -------------
325 ``tx-custom-low-usecs <usecs>``
329 ``tx-custom-high-usecs <usecs>``
333 ``tx-custom-low-usecs + tx-custom-high-usecs``.
335 ``<op>[,<mode>] tx-custom-bit <bit>``
337 be an Ack bit. If <op> specifies a specific CEC opcode then the bit
340 ``<op>[,<mode>] tx-custom-start``
343 ``tx-custom-pulse``
347 -------------
355 ``tx-glitch-low-usecs <usecs>``
357 the CEC line low. The default is 1 microsecond. The range is 0-100
360 ``tx-glitch-high-usecs <usecs>``
363 The default is 1 microseconds. The range is 0-100 microseconds. If 0, then
365 ``tx-custom-low-usecs + tx-custom-high-usecs``.
367 ``tx-glitch-falling-edge``
370 ``tx-glitch-rising-edge``