aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/modem_if/modem_sim_slot_switch.c
diff options
context:
space:
mode:
authorimilka <pkzl22@gmail.com>2012-11-10 22:16:18 +0000
committerEspen Fjellvær Olsen <espen@mrfjo.org>2012-11-11 15:59:50 +0100
commit3c3b858c0168ae826525595ef2fb5d275484f989 (patch)
tree582c77f5deabe0604845fccde2b4186f4c82857a /drivers/misc/modem_if/modem_sim_slot_switch.c
parentb1b33a2c6e1af144fae79c803df637683502e5c8 (diff)
downloadkernel_samsung_smdk4412-3c3b858c0168ae826525595ef2fb5d275484f989.zip
kernel_samsung_smdk4412-3c3b858c0168ae826525595ef2fb5d275484f989.tar.gz
kernel_samsung_smdk4412-3c3b858c0168ae826525595ef2fb5d275484f989.tar.bz2
n7100 support
Change-Id: I111e3be9a1c6ea8b68eab5c87fa6c084ba9bb5c3
Diffstat (limited to 'drivers/misc/modem_if/modem_sim_slot_switch.c')
-rw-r--r--drivers/misc/modem_if/modem_sim_slot_switch.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/misc/modem_if/modem_sim_slot_switch.c b/drivers/misc/modem_if/modem_sim_slot_switch.c
index 1dd4c67..c8e83ed 100644
--- a/drivers/misc/modem_if/modem_sim_slot_switch.c
+++ b/drivers/misc/modem_if/modem_sim_slot_switch.c
@@ -16,6 +16,10 @@ static ssize_t get_slot_switch(struct device *dev, struct device_attribute *attr
//return '0' slot path is '||', return '1' slot path is 'X'
value = gpio_get_value(GPIO_UIM_SIM_SEL);
+#if defined(CONFIG_MACH_T0_CHN_CTC)
+ if (system_rev < 7)
+ value = (~value & 0x1);
+#endif
printk("Current Slot is %x\n", value);
return sprintf(buf, "%d\n", value);
@@ -29,10 +33,20 @@ static ssize_t set_slot_switch(struct device *dev, struct device_attribute *attr
switch(value) {
case 0:
+#if defined(CONFIG_MACH_T0_CHN_CTC)
+ if (system_rev < 7)
+ gpio_set_value(GPIO_UIM_SIM_SEL, 1);
+ else
+#endif
gpio_set_value(GPIO_UIM_SIM_SEL, 0);
printk("set slot switch to %x\n", gpio_get_value(GPIO_UIM_SIM_SEL));
break;
case 1:
+#if defined(CONFIG_MACH_T0_CHN_CTC)
+ if (system_rev < 7)
+ gpio_set_value(GPIO_UIM_SIM_SEL, 0);
+ else
+#endif
gpio_set_value(GPIO_UIM_SIM_SEL, 1);
printk("set slot switch to %x\n", gpio_get_value(GPIO_UIM_SIM_SEL));
break;
@@ -61,10 +75,11 @@ static int __init slot_switch_manager_init(void)
gpio_direction_output(GPIO_UIM_SIM_SEL, 1);
s3c_gpio_setpull(GPIO_UIM_SIM_SEL, S3C_GPIO_PULL_NONE);
#if defined(CONFIG_MACH_T0_CHN_CTC)
+ if (system_rev < 7)
gpio_set_value(GPIO_UIM_SIM_SEL, 1);
-#else
- gpio_set_value(GPIO_UIM_SIM_SEL, 0);
+ else
#endif
+ gpio_set_value(GPIO_UIM_SIM_SEL, 0);
}
//initailize slot switch device