summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/Documentation
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-07-20 16:40:25 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-20 10:16:54 -0700
commit93e29c8530881766837e62088d54ffb733f8bc2a (patch)
tree1a26b9ad54d878b4c45771bfb3e064836b9f4a03 /drivers/staging/greybus/Documentation
parent12169bc9143ed24ad7a5ea12a7c28d1dba891131 (diff)
greybus: interface: add power_state attribute
User space needs the capability of powering ON or OFF an Interface for multiple use cases. For example, userspace may want an Interface currently in its S3 boot stage, to boot into its S2 Loader stage to update the bridge SPI flash. Or the Interface is running its S2 Loader stage and updated the SPI flash with the new S2 Loader firmware and wants to boot into the new S2 Loader firmware. Another use case can be, Android wants to disable (not eject) a misbehaving module. Add a 'power_state' sysfs file within the interface directory. It can be read to know the current power state of the Interface and can be written to power ON or power OFF an Interface. Possible values that can be written or read from it are: "on" and "off". Testing Done: Tested by enabling/disabling camera module on EVT 2.0. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> CC: David Lin <dtwlin@google.com> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> [johan: drop es3-quirk duplication, add to power attribute group, fix return value, drop tags ] Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Sandeep Patil <sspatil@google.com> Reviewed-by: Patrick Titiano <ptitiano@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/Documentation')
-rw-r--r--drivers/staging/greybus/Documentation/sysfs-bus-greybus17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/staging/greybus/Documentation/sysfs-bus-greybus b/drivers/staging/greybus/Documentation/sysfs-bus-greybus
index 721010e22b25..62d03afe9c85 100644
--- a/drivers/staging/greybus/Documentation/sysfs-bus-greybus
+++ b/drivers/staging/greybus/Documentation/sysfs-bus-greybus
@@ -97,6 +97,23 @@ Contact: Greg Kroah-Hartman <greg@kroah.com>
Description:
Power measurement of the interface in microwatts (uW)
+What: /sys/bus/greybus/devices/N-M.I/power_state
+Date: March 2016
+KernelVersion: 4.XX
+Contact: Greg Kroah-Hartman <greg@kroah.com>
+Description:
+ This reflects the power state of a Greybus Interface. If the
+ value read from it is "on", then power is currently supplied to
+ the Interface. Otherwise this will read "off" and the power is
+ currently not supplied to the Interface.
+
+ If the value read is "off", then writing "on" (or '1', 'y',
+ 'Y') to it will enable power to the Interface. If the value
+ read is "on", then writing "off" (or '0', 'n', 'N') to it will
+ disable power to the Interface.
+
+ Writing the currently read value to it has no effect.
+
What: /sys/bus/greybus/devices/N-M.I/product_id
Date: October 2015
KernelVersion: 4.XX