greybus: svc: add intf_eject attribute

Add a new write-only svc attribute to send an eject request to the svc
giving the interface number.

So, doing:
echo 3 > /sys/bus/greybus/devices/1-svc/intf_eject

will force eject the module on interface 3 (module slot 1 on EVT1).
This can take some seconds as the pulse width for module release is
large.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Jeffrey Carlyle <jcarlyle@google.com>
This commit is contained in:
Rui Miguel Silva 2016-01-11 13:46:33 +00:00 • committed by Greg Kroah-Hartman
commit 2c92bd5235
2 changed files with 37 additions and 0 deletions