greybus: arche-platform: Add support for init-off feature
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Tue, 19 Jul 2016 08:01:46 +0000 (13:31 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 20 Jul 2016 01:31:00 +0000 (18:31 -0700)
commitd29b67d44a7cf6d02e7319c0e5a4b729a0aa00e7
tree481519a8bb46664a4ef8b2837efbfffe1e0acc7e
parent042fd749abab492ae02452cf675f7bc146814955
greybus: arche-platform: Add support for init-off feature

Disable wake_detect interrupt after request

As part of SW-4344/SW-7061, now we are enabling FW flashing
to all builds. That means check for need of FW upgrade is
going to be present in all builds, and moving to FW_FlASHING
mode from active is heavy operation; so the idea here is
simplify this process and save the boot time due to switching
back-n-forth between ACTIVE<=>FW_FLASHING modes.

So we decided to put unipro into OFF state by default on boot,
which can be changed through DT property. If arche-platform
device node has "arche,init-off" property set, then unipro
will be in OFF state on boot. User can bring it back by

 # echo active > /sys/devices/arche_platform*/state

And to simply the exit code of probe() fn the
arche_platform_coldboot_seq() has been shifted to the
bottom of the _probe() fn.

Testing Done: Tested on EVT2 platform, with and without
"arche,init-off" property, multiple times.
Note: I am seeing SW-7128, which is not related to these changes.

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