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