1*f67449fdSHans VerkuilWhat:		/sys/kernel/debug/cec/*/error-inj
2*f67449fdSHans VerkuilDate:		March 2018
3*f67449fdSHans VerkuilContact:	Hans Verkuil <hans.verkuil@cisco.com>
4*f67449fdSHans VerkuilDescription:
5*f67449fdSHans Verkuil
6*f67449fdSHans VerkuilThe CEC Framework allows for CEC error injection commands through
7*f67449fdSHans Verkuildebugfs. Drivers that support this will create an error-inj file
8*f67449fdSHans Verkuilthrough which the error injection commands can be given.
9*f67449fdSHans Verkuil
10*f67449fdSHans VerkuilThe basic syntax is as follows:
11*f67449fdSHans Verkuil
12*f67449fdSHans VerkuilLeading spaces/tabs are ignored. If the next character is a '#' or the
13*f67449fdSHans Verkuilend of the line was reached, then the whole line is ignored. Otherwise
14*f67449fdSHans Verkuila command is expected.
15*f67449fdSHans Verkuil
16*f67449fdSHans VerkuilIt is up to the driver to decide what commands to implement. The only
17*f67449fdSHans Verkuilexception is that the command 'clear' without any arguments must be
18*f67449fdSHans Verkuilimplemented and that it will remove all current error injection
19*f67449fdSHans Verkuilcommands.
20*f67449fdSHans Verkuil
21*f67449fdSHans VerkuilThis ensures that you can always do 'echo clear >error-inj' to clear any
22*f67449fdSHans Verkuilerror injections without having to know the details of the driver-specific
23*f67449fdSHans Verkuilcommands.
24*f67449fdSHans Verkuil
25*f67449fdSHans VerkuilNote that the output of 'error-inj' shall be valid as input to 'error-inj'.
26*f67449fdSHans VerkuilSo this must work:
27*f67449fdSHans Verkuil
28*f67449fdSHans Verkuil	$ cat error-inj >einj.txt
29*f67449fdSHans Verkuil	$ cat einj.txt >error-inj
30*f67449fdSHans Verkuil
31*f67449fdSHans VerkuilOther than these basic rules described above this ABI is not considered
32*f67449fdSHans Verkuilstable and may change in the future.
33*f67449fdSHans Verkuil
34*f67449fdSHans VerkuilDrivers that implement this functionality must document the commands as
35*f67449fdSHans Verkuilpart of the CEC documentation and must keep that documentation up to date
36*f67449fdSHans Verkuilwhen changes are made.
37*f67449fdSHans Verkuil
38*f67449fdSHans VerkuilThe following CEC error injection implementations exist:
39*f67449fdSHans Verkuil
40*f67449fdSHans Verkuil- Documentation/media/uapi/cec/cec-pin-error-inj.rst
41