diff options
author | Simon Ser <simon.ser@intel.com> | 2019-08-13 16:45:45 +0300 |
---|---|---|
committer | Simon Ser <simon.ser@intel.com> | 2019-08-15 13:09:20 +0300 |
commit | 750f50bbf6b589f42222f71af748c85272bbcb48 (patch) | |
tree | 1052656ec9196b9dc086080da2d875cb53391dd4 /lib/igt_chamelium.c | |
parent | 02b227b6b0ff968b997bfeffc14374c023f83394 (diff) |
lib/igt_chamelium: add chamelium_trigger_link_failure
This new function triggers a link failure on the provided port. Another
function called chamelium_supports_trigger_link_failure has been added to
check whether the Chamelium board supports the new method.
Support for TriggerLinkFailure in Chamelium has been added in [1].
[1]: https://chromium.googlesource.com/chromiumos/platform/chameleon/+/44866c7bc2af44da1f7bac4e782d0ed6d7c1400a
Signed-off-by: Simon Ser <simon.ser@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_chamelium.c')
-rw-r--r-- | lib/igt_chamelium.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c index 49ddadfb..1c0e1b39 100644 --- a/lib/igt_chamelium.c +++ b/lib/igt_chamelium.c @@ -1180,6 +1180,21 @@ void chamelium_infoframe_destroy(struct chamelium_infoframe *infoframe) free(infoframe); } +bool chamelium_supports_trigger_link_failure(struct chamelium *chamelium) +{ + return chamelium_supports_method(chamelium, "TriggerLinkFailure"); +} + +/** + * chamelium_trigger_link_failure: trigger a link failure on the provided port. + */ +void chamelium_trigger_link_failure(struct chamelium *chamelium, + struct chamelium_port *port) +{ + xmlrpc_DECREF(chamelium_rpc(chamelium, port, "TriggerLinkFailure", + "(i)", port->id)); +} + bool chamelium_has_audio_support(struct chamelium *chamelium, struct chamelium_port *port) { |