From: Michael Scott Date: Thu, 28 Jan 2016 00:41:00 +0000 (-0800) Subject: greybus: arche-platform: assert wake-detect to complete WAKE_OUT event X-Git-Tag: v4.9.8~1233^2~378^2~21^2~740 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e83ee3321447679eb327fed90f366ef18411778;p=platform%2Fkernel%2Flinux-rpi3.git greybus: arche-platform: assert wake-detect to complete WAKE_OUT event After SVC generates WAKE_OUT (pulling wake-detect pin low) and APB is brought out of reset, we need to assert wake-detect again to complete SVC WAKE_OUT logic. Testing Done: - Used for DB3.5/EVT1.5 hardware during bringup - Regression tested on DB3.1+ES2, DB3.1+ES3 Signed-off-by: Michael Scott Reviewed-by: Vaibhav Hiremath Tested-by: Vaibhav Hiremath Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c index b6fb90e..f18cec6 100644 --- a/drivers/staging/greybus/arche-platform.c +++ b/drivers/staging/greybus/arche-platform.c @@ -79,9 +79,11 @@ static void svc_delayed_work(struct work_struct *work) if (timeout >= 0) { ret = of_platform_populate(np, NULL, NULL, dev); - if (!ret) - /* Should we set wake_detect gpio to output again? */ + if (!ret) { + /* re-assert wake_detect to confirm SVC WAKE_OUT */ + gpio_direction_output(arche_pdata->wake_detect_gpio, 1); return; + } } /* FIXME: We may want to limit retries here */