summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Blair <chris.blair@stericsson.com>2011-11-04 11:03:27 +0000
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:07:21 +0200
commit56972bcf391f80737671ff89badd69fd9101f2c5 (patch)
tree12a188fbd3cf7fc8c9aff6f62a2bd6fbd79fb03f /include
parent21b8f8e3134a838a71c90d467c4f72d7148651e7 (diff)
modem: Add M6718 IPC SPI driver protocol framework
Adds the M6718 modem IPC SPI driver procotol framework and types. Placeholders remain where future parts of the protocol will be called. ST-Ericsson ID: 369397 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-12224 ST-Ericsson Linux next: NA Change-Id: Id4cd5a7fa730c06838c9dd5b1a1cc0045135fdd4 Signed-off-by: Chris Blair <chris.blair@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36466 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/modem/m6718_spi/modem_driver.h32
-rw-r--r--include/linux/modem/m6718_spi/modem_state.h36
2 files changed, 31 insertions, 37 deletions
diff --git a/include/linux/modem/m6718_spi/modem_driver.h b/include/linux/modem/m6718_spi/modem_driver.h
index 8c5209c228c..f3aae4a7116 100644
--- a/include/linux/modem/m6718_spi/modem_driver.h
+++ b/include/linux/modem/m6718_spi/modem_driver.h
@@ -128,8 +128,38 @@ struct modem_spi_dev {
bool msr_flag;
};
-/* function exported for L1 to call with received frames */
+/**
+ * struct modem_m6718_spi_link_gpio - gpio configuration for an IPC link
+ * @ss_pin: pins to use for slave-select
+ * @ss_active: active level for slave-select pin
+ * @int_pin: pin to use for slave-int (ready)
+ * @int_active: active level for slave-int
+ */
+struct modem_m6718_spi_link_gpio {
+ int ss_pin;
+ int ss_active;
+ int int_pin;
+ int int_active;
+};
+
+/**
+ * struct modem_m6718_spi_link_platform_data - IPC link data
+ * @id: link id
+ * @gpio: link gpio configuration
+ * @name: link name (to appear in debugfs)
+ */
+struct modem_m6718_spi_link_platform_data {
+ int id;
+ struct modem_m6718_spi_link_gpio gpio;
+#ifdef CONFIG_DEBUG_FS
+ const char *name;
+#endif
+};
+
int modem_m6718_spi_receive(struct spi_device *sdev, u8 channel,
u32 len, void *data);
+int modem_m6718_spi_send(struct modem_spi_dev *modem_spi_dev, u8 channel,
+ u32 len, void *data);
+bool modem_m6718_spi_is_boot_done(void);
#endif /* _MODEM_DRIVER_H_ */
diff --git a/include/linux/modem/m6718_spi/modem_state.h b/include/linux/modem/m6718_spi/modem_state.h
deleted file mode 100644
index a2f1d9fbe3e..00000000000
--- a/include/linux/modem/m6718_spi/modem_state.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2011
- *
- * Author: Derek Morton <derek.morton@stericsson.com>
- *
- * 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