aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorBibek Basu <bibek.basu@stericsson.com>2011-05-23 11:43:41 +0530
committersaid m bagheri <ebgheri@steludxu2848.(none)>2011-06-29 10:30:30 +0200
commit0af2d97c3df60e9fd83ff1e394517a49bbb8399f (patch)
treee5fc438f7202e3859fa11dfd57d03097e71254a1 /arch/arm
parentb56ccf8470273e5a069cc5e76d32f24efd5963d0 (diff)
U8500 : driver for awaking modem on sim hot swap activity
This driver uses GPIO to detect SIM hot swap and uses Modem Access Framework to wake up modem. ST-Ericsson Linux next: 336280 ST-Ericsson ID: 329459 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ib4b1f67422317850f5d859ddf4c5e457f4cb616c Signed-off-by: Bibek Basu <bibek.basu@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23543 Reviewed-by: QATEST Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c19
-rw-r--r--arch/arm/mach-ux500/include/mach/sim_detect.h16
2 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 8fea2580eef..d1467ea64c0 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -49,6 +49,9 @@
#include <mach/irqs.h>
#include <mach/ste_audio.h>
#include <mach/ste-dma40-db8500.h>
+#ifdef CONFIG_U8500_SIM_DETECT
+#include <mach/sim_detect.h>
+#endif
#include <video/av8100.h>
#include <plat/pincfg.h>
@@ -649,8 +652,24 @@ static struct hsi_board_info __initdata u8500_hsi_devices[] = {
};
#endif
+#ifdef CONFIG_U8500_SIM_DETECT
+static struct sim_detect_platform_data sim_detect_pdata = {
+ .irq_num = NOMADIK_GPIO_TO_IRQ(MOP500_AB8500_GPIO(12)),
+};
+struct platform_device u8500_sim_detect_device = {
+ .name = "sim_detect",
+ .id = 0,
+ .dev = {
+ .platform_data = &sim_detect_pdata,
+ },
+};
+#endif
+
/* add any platform devices here - TODO */
static struct platform_device *mop500_platform_devs[] __initdata = {
+#ifdef CONFIG_U8500_SIM_DETECT
+ &u8500_sim_detect_device,
+#endif
&u8500_shrm_device,
#ifdef CONFIG_U8500_MMIO
&ux500_mmio_device,
diff --git a/arch/arm/mach-ux500/include/mach/sim_detect.h b/arch/arm/mach-ux500/include/mach/sim_detect.h
new file mode 100644
index 00000000000..8d6e81f1e8a
--- /dev/null
+++ b/arch/arm/mach-ux500/include/mach/sim_detect.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright ST-Ericsson 2010 SA.
+ *
+ * Author: Bibek Basu <bibek.basu@stericsson.com>
+ * Licensed under GPLv2.
+ */
+
+#ifndef _AB8500_SIM_DETECT_H
+#define _AB8500_SIM_DETECT_H
+
+struct sim_detect_platform_data {
+ int irq_num;
+};
+
+#endif
+