]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/staging/greybus/arche-apb-ctrl.c
greybus: arche-apb-ctrl: Add sysfs to allow user to change state
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Fri, 12 Feb 2016 20:34:13 +0000 (02:04 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 15 Feb 2016 21:18:40 +0000 (13:18 -0800)
commit33d76291073dd9408055a23cd96a23c375944377
tree7c7275ecc58ca605ca4d27359c44b42651c1fdeb
parent6961e0466575608639e91ddbcc62d9385d45a198
greybus: arche-apb-ctrl: Add sysfs to allow user to change state

This patch introduces sysfs interface for the user space to enable
state change of the driver. Driver supports below operational
states,

 - off
 - active
 - standby
 - fw_flashing

To see the current state

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

And to change the state
 # echo [off/active/standby/fw_flashing] > /sys/devices/arche_platform.*/apb*/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-apb-ctrl.c