greybus: svc: implement interface mailbox event
authorJohan Hovold <johan@hovoldconsulting.com>
Sat, 23 Apr 2016 16:47:31 +0000 (18:47 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 25 Apr 2016 18:08:30 +0000 (11:08 -0700)
commitb482b0d6f099e282c7499b5b1a3a69747bf4fa8b
tree9eed32083d9dd799a7d3adebcfdfce45a46ef257
parent22bb9380d620b9632fb47220133ee6ab3fd36f22
greybus: svc: implement interface mailbox event

Implement the new interface mailbox-event operation.

The event is sent by the SVC under certain conditions when an interface
updates its mailbox value. Specifically, this event will be used to
implement the new mode-switch functionality.

Upon reception the AP verifies that the interface is known and that the
mailbox has the expected MAILBOX_GREYBUS value. If so, the interface is
disabled before being re-enabled (re-enumerated).

Note that during mode-switch, the interface will typically already be in
a disabled state when the mailbox is written (with the ES3 bootrom being
the notable exception).

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/svc.c