greybus: arche_platform: Add sysfs to allow user to change state
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Fri, 12 Feb 2016 20:34:07 +0000 (02:04 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Feb 2016 21:18:40 +0000 (13:18 -0800)
commit2923c58eb5acb019e6781dc05662b896e14339f6
treec602162c123e6148c4500f5dffb73d1275fe49c4
parentb4c95fca6a9dd8ac2242a451e53781d5313b8c1d
greybus: arche_platform: Add sysfs to allow user to change state

This patch introduces sysfs interface for the user space to enable
operational state change of the driver.
Currently, driver supports, 'off', 'active' and 'standby'

Note that, driver doesn't do anything for standby state as of today.

To see the current state

      # cat /sys/devices/arche_platform.*/state

And to change the state
      # echo [off/active/standby] > /sys/devices/arche_platform.*/state

Testing Done: Tested on EVT1.2 and DB3.5 platform.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/arche-platform.c