Bluetooth: btintel_pcie: Add fatal error injection test mode

Add the FATAL_ERR_TESTMODE debug INI option to inject a firmware
exception for testing. The INI value selects the exception type and the
injection context (thread, IRQ or rfkill). Whether an injected
exception is expected to trigger recovery depends on its type.

The test mode is disabled when the OPFW API lock is set, unless the
unlocker firmware was loaded.

While HCI is up, the hardware rfkill button only triggers the
injection: an assertion injects the exception, a release is ignored,
and normal rfkill reporting to the HCI stack is disabled. While HCI is
down, normal rfkill handling applies.

The exception is also injected after every successful setup, with the
rfkill context and without sampling the rfkill state. The injection
stays pending until HCI is up, and open() reschedules it. After a
recovery re-probe it is injected again, until the INI entry is removed.

Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
6 files changed