greybus: arche-platform: Fix boot, poweroff and fw_flashing seq with APBs
Now SVC driver has an access to APBs operational functions
(coldboot, standby_boot, fw_flashing and poweroff), SVC driver
can control APB's as per below rules,
- If SVC goes down (poweroff state), it will also power off APBs
and vice a versa for all operational states.
- On boot, SVC will probe/populate APB device, but will not coldboot
it. APBs will coldboot only after handshaking with SVC over
wake/detect line.
Note that, both APBs share same wake/detect line.
So from user/developer perspective, it is highly recommended that
they should use arche-platform interfaces, instead of individual
apb interface,
# echo [off/active/standby/fw_flashing] > /sys/devices/arche_platform.*/state
Note: 'standby' mode is not supported as of now.
Testing Done: Testd 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>