Lines Matching +full:toggle +full:- +full:mode

1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
7 has low-level support for the CEC bus. Most hardware today will have
8 high-level CEC support where the hardware deals with driving the CEC bus,
17 Currently only the cec-gpio driver (when the CEC line is directly
18 connected to a pull-up GPIO line) and the AllWinner A10/A20 drm driver
23 now an ``error-inj`` file.
30 With ``cat error-inj`` you can see both the possible commands and the current
33 $ cat /sys/kernel/debug/cec/cec0/error-inj
36 # rx-clear clear all rx error injections
37 # tx-clear clear all tx error injections
39 # <op> rx-clear clear all rx error injections for <op>
40 # <op> tx-clear clear all tx error injections for <op>
43 # <op>[,<mode>] rx-nack NACK the message instead of sending an ACK
44 # <op>[,<mode>] rx-low-drive <bit> force a low-drive condition at this bit position
45 # <op>[,<mode>] rx-add-byte add a spurious byte to the received CEC message
46 # <op>[,<mode>] rx-remove-byte remove the last byte from the received CEC message
47 # any[,<mode>] rx-arb-lost [<poll>] generate a POLL message to trigger an arbitration lost
50 # tx-ignore-nack-until-eom ignore early NACKs until EOM
51 # tx-custom-low-usecs <usecs> define the 'low' time for the custom pulse
52 # tx-custom-high-usecs <usecs> define the 'high' time for the custom pulse
53 # tx-custom-pulse transmit the custom pulse once the bus is idle
56 # <op>[,<mode>] tx-no-eom don't set the EOM bit
57 # <op>[,<mode>] tx-early-eom set the EOM bit one byte too soon
58 # <op>[,<mode>] tx-add-bytes <num> append <num> (1-255) spurious bytes to the message
59 # <op>[,<mode>] tx-remove-byte drop the last byte from the message
60 # <op>[,<mode>] tx-short-bit <bit> make this bit shorter than allowed
61 # <op>[,<mode>] tx-long-bit <bit> make this bit longer than allowed
62 # <op>[,<mode>] tx-custom-bit <bit> send the custom pulse instead of this bit
63 # <op>[,<mode>] tx-short-start send a start pulse that's too short
64 # <op>[,<mode>] tx-long-start send a start pulse that's too long
65 # <op>[,<mode>] tx-custom-start send the custom pulse instead of the start pulse
66 # <op>[,<mode>] tx-last-bit <bit> stop sending after this bit
67 # <op>[,<mode>] tx-low-drive <bit> force a low-drive condition at this bit position
69 # <op> CEC message opcode (0-255) or 'any'
70 # <mode> 'once' (default), 'always', 'toggle' or 'off'
71 # <bit> CEC message bit (0-159)
72 # 10 bits per 'byte': bits 0-7: data, bit 8: EOM, bit 9: ACK
73 # <poll> CEC poll message used to test arbitration lost (0x00-0xff, default 0x0f)
74 # <usecs> microseconds (0-10000000, default 1000)
78 You can write error injection commands to ``error-inj`` using
79 ``echo 'cmd' >error-inj`` or ``cat cmd.txt >error-inj``. The ``cat error-inj``
81 and use it as an input to ``error-inj`` later.
84 ------------
96 all opcodes (``any``). Each command also has a 'mode' which can be ``off``
100 injection and ``toggle`` to toggle the error injection on or off for every
103 So '``any rx-nack``' will NACK the next received CEC message,
104 '``any,always rx-nack``' will NACK all received CEC messages and
105 '``0x82,toggle rx-nack``' will only NACK if an Active Source message was
108 After an error was injected with mode ``once`` the error injection command
109 is cleared automatically, so ``once`` is a one-time deal.
111 All combinations of ``<op>`` and error injection commands can co-exist. So
114 0x9e tx-add-bytes 1
115 0x9e tx-early-eom
116 0x9f tx-add-bytes 2
117 any rx-nack
124 0x9e tx-add-bytes 1
125 0x9e tx-add-bytes 2
130 ----------------------
135 ``rx-clear``
138 ``tx-clear``
144 ``<op> rx-clear``
147 ``<op> tx-clear``
151 ----------------
153 ``<op>[,<mode>] rx-nack``
158 ``<op>[,<mode>] rx-low-drive <bit>``
167 ``<op>[,<mode>] rx-add-byte``
170 the high-level protocol since spurious bytes should be ignored.
172 ``<op>[,<mode>] rx-remove-byte``
174 was at least 2 bytes long. This is useful to test the high-level
177 ``<op>[,<mode>] rx-arb-lost <poll>``
181 to transmit mode and it will transmit a POLL message. By default this is
195 -----------------
197 ``tx-ignore-nack-until-eom``
208 ``<op>[,<mode>] tx-no-eom``
210 (End-Of-Message) bit set. With this command the transmit will just stop
212 handles this case. Normally receivers have a time-out after which
215 ``<op>[,<mode>] tx-early-eom``
217 of two bytes or more. The EOM bit will be set for the second-to-last byte
223 ``<op>[,<mode>] tx-add-bytes <num>``
224 Append ``<num>`` (1-255) spurious bytes to the message. The extra bytes
234 ``<op>[,<mode>] tx-remove-byte``
238 ``<op>[,<mode>] tx-short-bit <bit>``
251 sees a too-short 0 bit.
253 ``<op>[,<mode>] tx-long-bit <bit>``
269 sees a too-long 0 bit.
271 ``<op>[,<mode>] tx-short-start``
278 ``<op>[,<mode>] tx-long-start``
290 ``<op>[,<mode>] tx-last-bit <bit>``
297 ``<op>[,<mode>] tx-low-drive <bit>``
302 positions 0-3 the receiver can interpret this as an Arbitration Lost
306 -------------
308 ``tx-custom-low-usecs <usecs>``
312 ``tx-custom-high-usecs <usecs>``
316 ``tx-custom-low-usecs + tx-custom-high-usecs``.
318 ``<op>[,<mode>] tx-custom-bit <bit>``
323 ``<op>[,<mode>] tx-custom-start``
326 ``tx-custom-pulse``