summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/arche-apb-ctrl.c
diff options
context:
space:
mode:
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>2016-01-06 23:46:45 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-06 20:03:18 -0800
commitae0bf3a62805fa80c8277dd293d9d9d9b8b4c7c0 (patch)
treef50efae3fd6aff4d2c95f2d15e7a4b0ac35be76e /drivers/staging/greybus/arche-apb-ctrl.c
parent6da86df3a4aa6dfbb9af350df4a908a7a9254be0 (diff)
greybus: arche-apb-ctrl: Set wake_detect gpio to low initially
This patch enables handshaking of AP and SVC using wake_detect gpio (WD_8A and WD_8B). Note that WAKE_DETECT polarity is active-high, so in order to enable handshaking between AP <=> SVC, we need to set wake_detect gpio to low initially, so that driver can send WAKE_DET signal (active-high) to SVC and then SVC can send back WAKE_MOD signal (active-low). And on reception of WAKE_MOD signal, driver would bring respective APB out of reset. WD_8A => APB1 WD_8B => APB2 Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/arche-apb-ctrl.c')
-rw-r--r--drivers/staging/greybus/arche-apb-ctrl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
index 8046e1eced83..d3db7fbb33b4 100644
--- a/drivers/staging/greybus/arche-apb-ctrl.c
+++ b/drivers/staging/greybus/arche-apb-ctrl.c
@@ -195,7 +195,8 @@ static int apb_ctrl_init_seq(struct platform_device *pdev,
gpio_set_value(apb->boot_ret_gpio, 0);
udelay(50);
- ret = devm_gpio_request(dev, apb->wake_detect_gpio, "wake detect");
+ ret = devm_gpio_request_one(dev, apb->wake_detect_gpio,
+ GPIOF_INIT_LOW, "wake detect");
if (ret)
dev_err(dev, "Failed requesting wake_detect gpio %d\n",
apb->wake_detect_gpio);