diff options
author | Sebastian Reichel <sre@ring0.de> | 2016-01-28 00:41:37 +0100 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2016-01-31 00:39:45 +0100 |
commit | b1744a38515fe073c3e8bdf892c7a64da3652b4c (patch) | |
tree | 60655ba3c7b911034e4a72fdce41df2b251c410f /plugins/nokia-gpio.c | |
parent | 08e16e7862a63979dbc34feb4c09a42c8919c03e (diff) | |
download | ofono-b1744a38515fe073c3e8bdf892c7a64da3652b4c.tar.bz2 |
n900: add n950 support
The Nokia N950 can use the same driver as the Nokia N900,
but the CBS interface is broken and must not be enabled.
Diffstat (limited to 'plugins/nokia-gpio.c')
-rw-r--r-- | plugins/nokia-gpio.c | 25 |
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; +} |