greybus: svc: add intf_eject attribute
authorRui Miguel Silva <rui.silva@linaro.org>
Mon, 11 Jan 2016 13:46:33 +0000 (13:46 +0000)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 13 Jan 2016 01:00:19 +0000 (17:00 -0800)
commit2c92bd5235ac72aa659150ebac309dd4f1c01079
treeec6f4269e7fcdfd1c6e4490f04eb3864a8d58e98
parentc5d55fb3596db4064491e7e5db6df8bf8f046078
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>
drivers/staging/greybus/Documentation/sysfs-bus-greybus
drivers/staging/greybus/svc.c