162306a36Sopenharmony_ciWhat:		/sys/kernel/debug/cec/*/error-inj
262306a36Sopenharmony_ciDate:		March 2018
362306a36Sopenharmony_ciContact:	Hans Verkuil <hverkuil-cisco@xs4all.nl>
462306a36Sopenharmony_ciDescription:
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciThe CEC Framework allows for CEC error injection commands through
762306a36Sopenharmony_cidebugfs. Drivers that support this will create an error-inj file
862306a36Sopenharmony_cithrough which the error injection commands can be given.
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciThe basic syntax is as follows:
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciLeading spaces/tabs are ignored. If the next character is a '#' or the
1362306a36Sopenharmony_ciend of the line was reached, then the whole line is ignored. Otherwise
1462306a36Sopenharmony_cia command is expected.
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciIt is up to the driver to decide what commands to implement. The only
1762306a36Sopenharmony_ciexception is that the command 'clear' without any arguments must be
1862306a36Sopenharmony_ciimplemented and that it will remove all current error injection
1962306a36Sopenharmony_cicommands.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciThis ensures that you can always do 'echo clear >error-inj' to clear any
2262306a36Sopenharmony_cierror injections without having to know the details of the driver-specific
2362306a36Sopenharmony_cicommands.
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciNote that the output of 'error-inj' shall be valid as input to 'error-inj'.
2662306a36Sopenharmony_ciSo this must work::
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci	$ cat error-inj >einj.txt
2962306a36Sopenharmony_ci	$ cat einj.txt >error-inj
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciOther than these basic rules described above this ABI is not considered
3262306a36Sopenharmony_cistable and may change in the future.
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciDrivers that implement this functionality must document the commands as
3562306a36Sopenharmony_cipart of the CEC documentation and must keep that documentation up to date
3662306a36Sopenharmony_ciwhen changes are made.
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciThe following CEC error injection implementations exist:
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci- Documentation/userspace-api/media/cec/cec-pin-error-inj.rst
41