提交 c92c1d02 编写于 作者: V Viresh Kumar 提交者: Greg Kroah-Hartman

greybus: fw-mgmt: Add hooks to do mode-switch

This is the last step to required to finish the mode switch story.  That
is, call the hook provided by Interface layer to accomplish mode switch.

Tested on EVT 1.5 with gpbridge-test module.
Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
Tested-by: NKarthik Ravi Shankar <karthikrs@google.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
上级 64060fe9
......@@ -484,7 +484,14 @@ static int fw_mgmt_ioctl(struct fw_mgmt *fw_mgmt, unsigned int cmd,
fw_mgmt->mode_switch_started = true;
/* FIXME: Initiate mode-switch from here */
ret = gb_interface_request_mode_switch(fw_mgmt->connection->intf);
if (ret) {
dev_err(fw_mgmt->parent, "Mode-switch failed: %d\n",
ret);
fw_mgmt->mode_switch_started = false;
return ret;
}
return 0;
default:
return -ENOTTY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册