From 726fba97127de03f8b4ca6f7ec29e66b1d1b76e3 Mon Sep 17 00:00:00 2001 From: Chris Blair Date: Fri, 4 Nov 2011 09:29:42 +0000 Subject: modem: Port M6718 modem state driver Adds the modem state driver to the M6718 modem IPC interface. ST-Ericsson ID: 369397 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-12224 ST-Ericsson Linux next: NA Change-Id: I5566277b950aa0be954f4350bdc1ed38c7afd7d8 Signed-off-by: Chris Blair Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36434 Reviewed-by: Derek MORTON Reviewed-by: QATOOLS Reviewed-by: Andrew LYNN Reviewed-by: QABUILD Reviewed-by: Jonas ABERG --- include/linux/modem/m6718_spi/modem_state.h | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/linux/modem/m6718_spi/modem_state.h (limited to 'include') diff --git a/include/linux/modem/m6718_spi/modem_state.h b/include/linux/modem/m6718_spi/modem_state.h new file mode 100644 index 00000000000..a2f1d9fbe3e --- /dev/null +++ b/include/linux/modem/m6718_spi/modem_state.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) ST-Ericsson SA 2011 + * + * Author: Derek Morton + * + * License terms: GNU General Public License (GPL) version 2 + * + * Power state driver for M6718 MODEM + */ +#ifndef MODEM_STATE_H +#define MODEM_STATE_H + +enum modem_states { + MODEM_STATE_OFF, + MODEM_STATE_RESET, + MODEM_STATE_CRASH, + MODEM_STATE_ON, + /* + * Add new states before end marker and update modem_state_str[] + * in modem_state.c + */ + MODEM_STATE_END_MARKER +}; + +void modem_state_power_on(void); +void modem_state_power_off(void); +void modem_state_force_reset(void); +int modem_state_get_state(void); +char *modem_state_to_str(int state); + +/* Callbacks will be running in tasklet context */ +int modem_state_register_callback(int (*callback) (unsigned long), + unsigned long data); +int modem_state_remove_callback(int (*callback) (unsigned long)); + +#endif -- cgit v1.2.3