summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/greybus_firmware.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-05-14 23:42:22 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-15 00:23:52 +0200
commit04f0e6ebd1a2ca3a1f1a356e9a07ef1797ef1b7c (patch)
tree18dbcd5ac2ca664710aa1c32ee9237914b4c183b /drivers/staging/greybus/greybus_firmware.h
parent013e665372733fafd08599f0fc58ff5f450e4694 (diff)
downloadlinux-04f0e6ebd1a2ca3a1f1a356e9a07ef1797ef1b7c.tar.bz2
greybus: fw-management: Add ioctl to initiate mode-switch
Once the interface firmware is loaded successfully to a module, userspace can ask it to mode switch to the newly loaded firmware. This patch provides a new ioctl to initiate mode switch. Userspace can initiate a mode switch if it has previously loaded the interface firmware successfully, otherwise the firmware core rejects it. Also, once the mode-switch is initiated, disallow any more interactions from the userspace. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Tested-by: Karthik Ravi Shankar <karthikrs@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus_firmware.h')
-rw-r--r--drivers/staging/greybus/greybus_firmware.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus_firmware.h b/drivers/staging/greybus/greybus_firmware.h
index 9c5ad75438ae..4e194f21d475 100644
--- a/drivers/staging/greybus/greybus_firmware.h
+++ b/drivers/staging/greybus/greybus_firmware.h
@@ -79,6 +79,7 @@ struct fw_mgmt_ioc_backend_fw_update {
#define FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE _IOWR(FW_MGMT_IOCTL_BASE, 2, struct fw_mgmt_ioc_intf_load_and_validate)
#define FW_MGMT_IOC_INTF_BACKEND_FW_UPDATE _IOWR(FW_MGMT_IOCTL_BASE, 3, struct fw_mgmt_ioc_backend_fw_update)
#define FW_MGMT_IOC_SET_TIMEOUT_MS _IOW(FW_MGMT_IOCTL_BASE, 4, unsigned int)
+#define FW_MGMT_IOC_MODE_SWITCH _IO(FW_MGMT_IOCTL_BASE, 5)
#endif /* __GREYBUS_FIRMWARE_USER_H */