summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>2016-02-13 02:04:06 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-15 13:18:40 -0800
commitb4c95fca6a9dd8ac2242a451e53781d5313b8c1d (patch)
treeae558b206c3d16e5ce0902585025c0a8db77ce6d /drivers
parente74d04a5810233a95cb7a556165817d378b89e44 (diff)
greybus: arche-platform: Pull wake/detect low in poweroff
When SVC goes down, make sure that wake/detect is also pulled low. Note that this is not the criteria for SVC poweroff, but it is required to have right state on wake/detect line before powering off. And on next boot, the boot-sequence code would take care of handshaking with SVC. Tested-on: 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/arche-platform.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index 1336fc4194c7..b2f3919f7cb3 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -136,6 +136,10 @@ static int arche_platform_coldboot_seq(struct arche_platform_drvdata *arche_pdat
static void arche_platform_poweroff_seq(struct arche_platform_drvdata *arche_pdata)
{
+ /* Send disconnect/detach event to SVC */
+ gpio_set_value(arche_pdata->wake_detect_gpio, 0);
+ usleep_range(100, 200);
+
clk_disable_unprepare(arche_pdata->svc_ref_clk);
/* As part of exit, put APB back in reset state */
svc_reset_onoff(arche_pdata->svc_reset_gpio,