summaryrefslogtreecommitdiffstats
path: root/plugins/nokia-gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/nokia-gpio.c')
-rw-r--r--plugins/nokia-gpio.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/plugins/nokia-gpio.c b/plugins/nokia-gpio.c
index 57aad8d0..f4c7895c 100644
--- a/plugins/nokia-gpio.c
+++ b/plugins/nokia-gpio.c
@@ -44,11 +44,6 @@
#define GPIO_SWITCH "/sys/devices/platform/gpio-switch"
#define DEV_CMT "/dev/cmt"
-enum rapu_type {
- RAPU_TYPE_1,
- RAPU_TYPE_2,
-};
-
enum retry_count {
RETRY_COUNT_RESET = 5,
RETRY_COUNT_POWER_ON = 10,
@@ -236,6 +231,10 @@ static void gpio_start_modem_power_on(void)
GPIO_WRITE(cmt_en, 1); /* Press "power key" */
GPIO_WRITE(cmt_rst, 1); /* Release CMT to boot */
break;
+
+ default:
+ ofono_error("unsupported modem type");
+ break;
}
GPIO_WRITE(cmt_rst_rq, 1);
@@ -257,6 +256,10 @@ static void gpio_finish_modem_power_on(void)
case RAPU_TYPE_1:
GPIO_WRITE(cmt_en, 0); /* release "power key" */
break;
+
+ default:
+ ofono_error("unsupported modem type");
+ break;
}
}
@@ -311,6 +314,10 @@ static void gpio_finish_modem_power_off(void)
GPIO_WRITE(cmt_rst, 1); /* release modem to be powered
off by bootloader */
break;
+
+ default:
+ ofono_error("unsupported modem type");
+ break;
}
}
@@ -818,3 +825,11 @@ int gpio_disable(void *data)
return -EINPROGRESS;
}
+
+int gpio_rapuyama_version(void *data)
+{
+ if (self.data != data)
+ return -EINVAL;
+
+ return self.rapu;
+}