Commit 0786212d authored by Vaibhav Hiremath's avatar Vaibhav Hiremath Committed by Greg Kroah-Hartman

greybus: arche-platform: Set direction of wake/detect gpio in poweroff fn

With support of interrupt based mechanism, gpio is not longer set to
output mode, so gpio_set_value won't work. So use
gpio_direction_output() fn in poweroff(), while setting value on
wake/detect line.

Testing Done: Tested on DB3.5 platform.
Signed-off-by: default avatarVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Reviewed-by: default avatarMichael Scott <michael.scott@linaro.org>
Tested-by: default avatarMichael Scott <michael.scott@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 16fe18ca
...@@ -266,7 +266,7 @@ static void arche_platform_poweroff_seq(struct arche_platform_drvdata *arche_pda ...@@ -266,7 +266,7 @@ static void arche_platform_poweroff_seq(struct arche_platform_drvdata *arche_pda
/* If in fw_flashing mode, then no need to repeate things again */ /* If in fw_flashing mode, then no need to repeate things again */
if (arche_pdata->state != ARCHE_PLATFORM_STATE_FW_FLASHING) { if (arche_pdata->state != ARCHE_PLATFORM_STATE_FW_FLASHING) {
/* Send disconnect/detach event to SVC */ /* Send disconnect/detach event to SVC */
gpio_set_value(arche_pdata->wake_detect_gpio, 0); gpio_direction_output(arche_pdata->wake_detect_gpio, 0);
usleep_range(100, 200); usleep_range(100, 200);
spin_lock_irqsave(&arche_pdata->lock, flags); spin_lock_irqsave(&arche_pdata->lock, flags);
arche_pdata->wake_detect_state = WD_STATE_IDLE; arche_pdata->wake_detect_state = WD_STATE_IDLE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment