aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/arche_platform.h
diff options
context:
space:
mode:
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>2016-05-05 15:34:58 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-05 13:49:02 -0700
commit886aba558b9e63c7025cabfaff8ca17f9fc02985 (patch)
tree50cf7df9e3492f5ab0543fc3d5718bc29a51d840 /drivers/staging/greybus/arche_platform.h
parentgreybus: arche-platform: Rename spinlock variable lock => wake_detect_lock (diff)
downloadlinux-dev-886aba558b9e63c7025cabfaff8ca17f9fc02985.tar.xz
linux-dev-886aba558b9e63c7025cabfaff8ca17f9fc02985.zip
greybus: arche-platform: Export fn to allow timesync driver to change the state
With the addition of the timesync driver and looking at the hardware interfaces we have, its clear we need to add a new arche-platform state. This patch adds ARCHE_PLATFORM_STATE_TIME_SYNC to the arche-platform driver to facilitate transition to the TIME_SYNC state if-and-only-if the arche-platform driver is in the ACTIVE state. This is mainly needed as wake/detect lines are shared between TIMESYNC operation and basic control functionality of APBs. So during TIMESYNC we want to make sure that the events on wake/detect lines are ignored by the arche-platform APB reset logic. This patch adds one exported function, which can be invoked from timesync driver code, allowing, switching between ARCHE_PLATFORM_STATE_TIME_SYNC <=> ARCHE_PLATFORM_STATE_ACTIVE states. [ bryan.odonoghue@linaro.org: Added mutex, massaged commit text ] Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Suggested-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/arche_platform.h')
-rw-r--r--drivers/staging/greybus/arche_platform.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/greybus/arche_platform.h b/drivers/staging/greybus/arche_platform.h
index 69b627b978b8..0f2d29208f7f 100644
--- a/drivers/staging/greybus/arche_platform.h
+++ b/drivers/staging/greybus/arche_platform.h
@@ -15,8 +15,10 @@ enum arche_platform_state {
ARCHE_PLATFORM_STATE_ACTIVE,
ARCHE_PLATFORM_STATE_STANDBY,
ARCHE_PLATFORM_STATE_FW_FLASHING,
+ ARCHE_PLATFORM_STATE_TIME_SYNC,
};
+int arche_platform_change_state(enum arche_platform_state state);
int __init arche_apb_init(void);
void __exit arche_apb_exit(void);