diff options
author | Vaibhav Hiremath <vaibhav.hiremath@linaro.org> | 2016-02-13 02:04:02 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-02-12 23:01:32 -0800 |
commit | a821adb47d28e22f96716b0ab8c4a8d5f7d3dadb (patch) | |
tree | 5a603f73bd9191bbc3e9025d5c643d0dc71f8cdb /drivers/staging/greybus/arche-apb-ctrl.c | |
parent | 397d34152423d2ddbff3e48495ef988cbb07776b (diff) | |
download | op-kernel-dev-a821adb47d28e22f96716b0ab8c4a8d5f7d3dadb.zip op-kernel-dev-a821adb47d28e22f96716b0ab8c4a8d5f7d3dadb.tar.gz |
greybus: arche-platform: make apb_state common to both platform drivers
Make 'enum apb_state' common to both platform drivers, so that
both drivers can make use of same state and user will have
unified control configuration across devices (SVC, APB1 and APB2)
Testing Done: 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/staging/greybus/arche-apb-ctrl.c')
-rw-r--r-- | drivers/staging/greybus/arche-apb-ctrl.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c index f2bad8d..42267fa 100644 --- a/drivers/staging/greybus/arche-apb-ctrl.c +++ b/drivers/staging/greybus/arche-apb-ctrl.c @@ -21,11 +21,6 @@ #include <linux/spinlock.h> #include "arche_platform.h" -enum apb_state { - APB_STATE_OFF, - APB_STATE_ACTIVE, - APB_STATE_STANDBY, -}; struct arche_apb_ctrl_drvdata { /* Control GPIO signals to and from AP <=> AP Bridges */ @@ -36,7 +31,7 @@ struct arche_apb_ctrl_drvdata { int wake_out_gpio; int pwrdn_gpio; - enum apb_state state; + enum arche_platform_state state; struct regulator *vcore; struct regulator *vio; @@ -232,7 +227,7 @@ static void apb_ctrl_cleanup(struct arche_apb_ctrl_drvdata *apb) /* As part of exit, put APB back in reset state */ assert_reset(apb->resetn_gpio); - apb->state = APB_STATE_OFF; + apb->state = ARCHE_PLATFORM_STATE_OFF; /* TODO: May have to send an event to SVC about this exit */ } @@ -262,7 +257,7 @@ int arche_apb_ctrl_probe(struct platform_device *pdev) /* deassert reset to APB : Active-low signal */ deassert_reset(apb->resetn_gpio); - apb->state = APB_STATE_ACTIVE; + apb->state = ARCHE_PLATFORM_STATE_ACTIVE; platform_set_drvdata(pdev, apb); |