Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #include <linux/module.h> |
| 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/err.h> |
| 17 | #include <linux/slab.h> |
| 18 | #include <linux/io.h> |
| 19 | #include <linux/mutex.h> |
| 20 | #include <linux/miscdevice.h> |
| 21 | #include <linux/fs.h> |
| 22 | #include <linux/gpio.h> |
| 23 | #include <linux/kernel.h> |
| 24 | #include <linux/irq.h> |
| 25 | #include <linux/ioctl.h> |
| 26 | #include <linux/delay.h> |
| 27 | #include <linux/reboot.h> |
| 28 | #include <linux/debugfs.h> |
| 29 | #include <linux/completion.h> |
| 30 | #include <linux/workqueue.h> |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 31 | #include <linux/mfd/pmic8058.h> |
| 32 | #include <asm/mach-types.h> |
| 33 | #include <asm/uaccess.h> |
| 34 | #include <mach/mdm2.h> |
| 35 | #include <mach/restart.h> |
| 36 | #include <mach/subsystem_notif.h> |
| 37 | #include <mach/subsystem_restart.h> |
| 38 | #include <linux/msm_charm.h> |
| 39 | #include "msm_watchdog.h" |
| 40 | #include "devices.h" |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 41 | #include "mdm_private.h" |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 42 | #define MDM_PBLRDY_CNT 20 |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 43 | |
Joel King | 96c96dc | 2012-07-30 09:06:15 -0700 | [diff] [blame] | 44 | static int mdm_debug_mask; |
Joel King | 3da02a9 | 2012-03-20 10:55:52 -0700 | [diff] [blame] | 45 | static int power_on_count; |
Hemant Kumar | f1ca919 | 2012-02-07 18:59:33 -0800 | [diff] [blame] | 46 | static int hsic_peripheral_status; |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 47 | static DEFINE_MUTEX(hsic_status_lock); |
| 48 | |
| 49 | static void mdm_peripheral_connect(struct mdm_modem_drv *mdm_drv) |
| 50 | { |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 51 | if (!mdm_drv->pdata->peripheral_platform_device) |
| 52 | return; |
| 53 | |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 54 | mutex_lock(&hsic_status_lock); |
| 55 | if (hsic_peripheral_status) |
| 56 | goto out; |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 57 | platform_device_add(mdm_drv->pdata->peripheral_platform_device); |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 58 | hsic_peripheral_status = 1; |
| 59 | out: |
| 60 | mutex_unlock(&hsic_status_lock); |
| 61 | } |
| 62 | |
| 63 | static void mdm_peripheral_disconnect(struct mdm_modem_drv *mdm_drv) |
| 64 | { |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 65 | if (!mdm_drv->pdata->peripheral_platform_device) |
| 66 | return; |
| 67 | |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 68 | mutex_lock(&hsic_status_lock); |
| 69 | if (!hsic_peripheral_status) |
| 70 | goto out; |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 71 | platform_device_del(mdm_drv->pdata->peripheral_platform_device); |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 72 | hsic_peripheral_status = 0; |
| 73 | out: |
| 74 | mutex_unlock(&hsic_status_lock); |
| 75 | } |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 76 | |
Joel King | a7a7b9a | 2012-06-28 13:35:28 -0700 | [diff] [blame] | 77 | /* This function can be called from atomic context. */ |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 78 | static void mdm_toggle_soft_reset(struct mdm_modem_drv *mdm_drv) |
| 79 | { |
| 80 | int soft_reset_direction_assert = 0, |
| 81 | soft_reset_direction_de_assert = 1; |
| 82 | |
| 83 | if (mdm_drv->pdata->soft_reset_inverted) { |
| 84 | soft_reset_direction_assert = 1; |
| 85 | soft_reset_direction_de_assert = 0; |
| 86 | } |
| 87 | gpio_direction_output(mdm_drv->ap2mdm_soft_reset_gpio, |
| 88 | soft_reset_direction_assert); |
Joel King | a7a7b9a | 2012-06-28 13:35:28 -0700 | [diff] [blame] | 89 | /* Use mdelay because this function can be called from atomic |
| 90 | * context. |
| 91 | */ |
| 92 | mdelay(10); |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 93 | gpio_direction_output(mdm_drv->ap2mdm_soft_reset_gpio, |
| 94 | soft_reset_direction_de_assert); |
| 95 | } |
| 96 | |
Joel King | a7a7b9a | 2012-06-28 13:35:28 -0700 | [diff] [blame] | 97 | /* This function can be called from atomic context. */ |
| 98 | static void mdm_atomic_soft_reset(struct mdm_modem_drv *mdm_drv) |
| 99 | { |
| 100 | mdm_toggle_soft_reset(mdm_drv); |
| 101 | } |
| 102 | |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 103 | static void mdm_power_down_common(struct mdm_modem_drv *mdm_drv) |
| 104 | { |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 105 | int i; |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 106 | int soft_reset_direction = |
| 107 | mdm_drv->pdata->soft_reset_inverted ? 1 : 0; |
| 108 | |
Hemant Kumar | 069f643 | 2012-08-22 18:30:19 -0700 | [diff] [blame] | 109 | mdm_peripheral_disconnect(mdm_drv); |
| 110 | |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 111 | /* Wait for the modem to complete its power down actions. */ |
| 112 | for (i = 20; i > 0; i--) { |
Joel King | bf3e4b5 | 2012-09-26 09:10:34 -0700 | [diff] [blame] | 113 | if (gpio_get_value(mdm_drv->mdm2ap_status_gpio) == 0) { |
| 114 | if (mdm_debug_mask & MDM_DEBUG_MASK_SHDN_LOG) |
| 115 | pr_info("%s: mdm2ap_status went low, i = %d\n", |
| 116 | __func__, i); |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 117 | break; |
Joel King | bf3e4b5 | 2012-09-26 09:10:34 -0700 | [diff] [blame] | 118 | } |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 119 | msleep(100); |
| 120 | } |
Taniya Das | 835e28f | 2012-12-11 10:23:33 +0530 | [diff] [blame] | 121 | |
| 122 | /* Assert the soft reset line whether mdm2ap_status went low or not */ |
| 123 | gpio_direction_output(mdm_drv->ap2mdm_soft_reset_gpio, |
| 124 | soft_reset_direction); |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 125 | if (i == 0) { |
| 126 | pr_err("%s: MDM2AP_STATUS never went low. Doing a hard reset\n", |
| 127 | __func__); |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 128 | /* |
| 129 | * Currently, there is a debounce timer on the charm PMIC. It is |
| 130 | * necessary to hold the PMIC RESET low for ~3.5 seconds |
| 131 | * for the reset to fully take place. Sleep here to ensure the |
| 132 | * reset has occured before the function exits. |
| 133 | */ |
| 134 | msleep(4000); |
| 135 | } |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | static void mdm_do_first_power_on(struct mdm_modem_drv *mdm_drv) |
| 139 | { |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 140 | int i; |
| 141 | int pblrdy; |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 142 | if (power_on_count != 1) { |
| 143 | pr_err("%s: Calling fn when power_on_count != 1\n", |
| 144 | __func__); |
| 145 | return; |
| 146 | } |
| 147 | |
| 148 | pr_err("%s: Powering on modem for the first time\n", __func__); |
| 149 | mdm_peripheral_disconnect(mdm_drv); |
| 150 | |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 151 | /* If this is the first power-up after a panic, the modem may still |
| 152 | * be in a power-on state, in which case we need to toggle the gpio |
| 153 | * instead of just de-asserting it. No harm done if the modem was |
| 154 | * powered down. |
| 155 | */ |
| 156 | mdm_toggle_soft_reset(mdm_drv); |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 157 | /* If the device has a kpd pwr gpio then toggle it. */ |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 158 | if (GPIO_IS_VALID(mdm_drv->ap2mdm_kpdpwr_n_gpio)) { |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 159 | /* Pull AP2MDM_KPDPWR gpio high and wait for PS_HOLD to settle, |
| 160 | * then pull it back low. |
| 161 | */ |
| 162 | pr_debug("%s: Pulling AP2MDM_KPDPWR gpio high\n", __func__); |
| 163 | gpio_direction_output(mdm_drv->ap2mdm_kpdpwr_n_gpio, 1); |
Taniya Das | a1a14a9 | 2013-01-21 15:14:15 +0530 | [diff] [blame] | 164 | gpio_direction_output(mdm_drv->ap2mdm_status_gpio, 1); |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 165 | msleep(1000); |
| 166 | gpio_direction_output(mdm_drv->ap2mdm_kpdpwr_n_gpio, 0); |
Taniya Das | a1a14a9 | 2013-01-21 15:14:15 +0530 | [diff] [blame] | 167 | } else |
| 168 | gpio_direction_output(mdm_drv->ap2mdm_status_gpio, 1); |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 169 | |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 170 | if (!GPIO_IS_VALID(mdm_drv->mdm2ap_pblrdy)) |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 171 | goto start_mdm_peripheral; |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 172 | |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 173 | for (i = 0; i < MDM_PBLRDY_CNT; i++) { |
| 174 | pblrdy = gpio_get_value(mdm_drv->mdm2ap_pblrdy); |
| 175 | if (pblrdy) |
| 176 | break; |
| 177 | usleep_range(5000, 5000); |
| 178 | } |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 179 | pr_debug("%s: i:%d\n", __func__, i); |
| 180 | |
| 181 | start_mdm_peripheral: |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 182 | mdm_peripheral_connect(mdm_drv); |
| 183 | msleep(200); |
| 184 | } |
| 185 | |
| 186 | static void mdm_do_soft_power_on(struct mdm_modem_drv *mdm_drv) |
| 187 | { |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 188 | int i; |
| 189 | int pblrdy; |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 190 | |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 191 | pr_err("%s: soft resetting mdm modem\n", __func__); |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 192 | mdm_peripheral_disconnect(mdm_drv); |
Joel King | 733377c | 2012-06-20 13:07:38 -0700 | [diff] [blame] | 193 | mdm_toggle_soft_reset(mdm_drv); |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 194 | |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 195 | if (!GPIO_IS_VALID(mdm_drv->mdm2ap_pblrdy)) |
Vamsi Krishna | c6dcd5e | 2012-05-09 15:38:01 -0700 | [diff] [blame] | 196 | goto start_mdm_peripheral; |
| 197 | |
| 198 | for (i = 0; i < MDM_PBLRDY_CNT; i++) { |
| 199 | pblrdy = gpio_get_value(mdm_drv->mdm2ap_pblrdy); |
| 200 | if (pblrdy) |
| 201 | break; |
| 202 | usleep_range(5000, 5000); |
| 203 | } |
| 204 | |
| 205 | pr_debug("%s: i:%d\n", __func__, i); |
| 206 | |
| 207 | start_mdm_peripheral: |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 208 | mdm_peripheral_connect(mdm_drv); |
| 209 | msleep(200); |
| 210 | } |
| 211 | |
| 212 | static void mdm_power_on_common(struct mdm_modem_drv *mdm_drv) |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 213 | { |
Joel King | 3da02a9 | 2012-03-20 10:55:52 -0700 | [diff] [blame] | 214 | power_on_count++; |
| 215 | |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 216 | /* this gpio will be used to indicate apq readiness, |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 217 | * de-assert it now so that it can be asserted later. |
| 218 | * May not be used. |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 219 | */ |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 220 | if (GPIO_IS_VALID(mdm_drv->ap2mdm_wakeup_gpio)) |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 221 | gpio_direction_output(mdm_drv->ap2mdm_wakeup_gpio, 0); |
Vamsi Krishna | 9e307cd | 2012-04-11 13:15:36 -0700 | [diff] [blame] | 222 | |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 223 | /* |
| 224 | * If we did an "early power on" then ignore the very next |
| 225 | * power-on request because it would the be first request from |
| 226 | * user space but we're already powered on. Ignore it. |
Joel King | 3da02a9 | 2012-03-20 10:55:52 -0700 | [diff] [blame] | 227 | */ |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 228 | if (mdm_drv->pdata->early_power_on && |
| 229 | (power_on_count == 2)) |
Joel King | 3da02a9 | 2012-03-20 10:55:52 -0700 | [diff] [blame] | 230 | return; |
| 231 | |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 232 | if (power_on_count == 1) |
| 233 | mdm_do_first_power_on(mdm_drv); |
| 234 | else |
| 235 | mdm_do_soft_power_on(mdm_drv); |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 236 | } |
| 237 | |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 238 | static void debug_state_changed(int value) |
| 239 | { |
Joel King | 96c96dc | 2012-07-30 09:06:15 -0700 | [diff] [blame] | 240 | mdm_debug_mask = value; |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 241 | } |
| 242 | |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 243 | static void mdm_status_changed(struct mdm_modem_drv *mdm_drv, int value) |
Vamsi Krishna | 3392563 | 2011-12-13 15:43:09 -0800 | [diff] [blame] | 244 | { |
Joel King | 2a42f50 | 2012-02-03 11:36:25 -0800 | [diff] [blame] | 245 | pr_debug("%s: value:%d\n", __func__, value); |
Vamsi Krishna | 3392563 | 2011-12-13 15:43:09 -0800 | [diff] [blame] | 246 | |
| 247 | if (value) { |
Joel King | d8052c0 | 2012-02-03 12:33:31 -0800 | [diff] [blame] | 248 | mdm_peripheral_disconnect(mdm_drv); |
| 249 | mdm_peripheral_connect(mdm_drv); |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 250 | if (GPIO_IS_VALID(mdm_drv->ap2mdm_wakeup_gpio)) |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 251 | gpio_direction_output(mdm_drv->ap2mdm_wakeup_gpio, 1); |
Vamsi Krishna | 3392563 | 2011-12-13 15:43:09 -0800 | [diff] [blame] | 252 | } |
| 253 | } |
| 254 | |
Ameya Thakur | 43248fd | 2012-07-10 18:50:52 -0700 | [diff] [blame] | 255 | static void mdm_image_upgrade(struct mdm_modem_drv *mdm_drv, int type) |
| 256 | { |
| 257 | switch (type) { |
| 258 | case APQ_CONTROLLED_UPGRADE: |
| 259 | pr_debug("%s APQ controlled modem image upgrade\n", __func__); |
| 260 | mdm_drv->mdm_ready = 0; |
| 261 | mdm_toggle_soft_reset(mdm_drv); |
| 262 | break; |
| 263 | case MDM_CONTROLLED_UPGRADE: |
| 264 | pr_debug("%s MDM controlled modem image upgrade\n", __func__); |
| 265 | mdm_drv->mdm_ready = 0; |
| 266 | /* |
| 267 | * If we have no image currently present on the modem, then we |
| 268 | * would be in PBL, in which case the status gpio would not go |
| 269 | * high. |
| 270 | */ |
| 271 | mdm_drv->disable_status_check = 1; |
Ameya Thakur | e155ece | 2012-07-09 12:08:37 -0700 | [diff] [blame] | 272 | if (GPIO_IS_VALID(mdm_drv->usb_switch_gpio)) { |
Ameya Thakur | 43248fd | 2012-07-10 18:50:52 -0700 | [diff] [blame] | 273 | pr_info("%s Switching usb control to MDM\n", __func__); |
| 274 | gpio_direction_output(mdm_drv->usb_switch_gpio, 1); |
| 275 | } else |
| 276 | pr_err("%s usb switch gpio unavailable\n", __func__); |
| 277 | break; |
| 278 | default: |
| 279 | pr_err("%s invalid upgrade type\n", __func__); |
| 280 | } |
| 281 | } |
Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 282 | static struct mdm_ops mdm_cb = { |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 283 | .power_on_mdm_cb = mdm_power_on_common, |
| 284 | .reset_mdm_cb = mdm_power_on_common, |
Joel King | a7a7b9a | 2012-06-28 13:35:28 -0700 | [diff] [blame] | 285 | .atomic_reset_mdm_cb = mdm_atomic_soft_reset, |
Joel King | e92eb87 | 2012-05-06 09:30:24 -0700 | [diff] [blame] | 286 | .power_down_mdm_cb = mdm_power_down_common, |
Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 287 | .debug_state_changed_cb = debug_state_changed, |
| 288 | .status_cb = mdm_status_changed, |
Ameya Thakur | 43248fd | 2012-07-10 18:50:52 -0700 | [diff] [blame] | 289 | .image_upgrade_cb = mdm_image_upgrade, |
Joel King | e9cd527 | 2012-01-28 12:48:59 -0800 | [diff] [blame] | 290 | }; |
| 291 | |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 292 | static int __init mdm_modem_probe(struct platform_device *pdev) |
| 293 | { |
Joel King | b6f0f61 | 2011-11-01 16:59:14 -0700 | [diff] [blame] | 294 | return mdm_common_create(pdev, &mdm_cb); |
| 295 | } |
| 296 | |
| 297 | static int __devexit mdm_modem_remove(struct platform_device *pdev) |
| 298 | { |
| 299 | return mdm_common_modem_remove(pdev); |
| 300 | } |
| 301 | |
| 302 | static void mdm_modem_shutdown(struct platform_device *pdev) |
| 303 | { |
| 304 | mdm_common_modem_shutdown(pdev); |
| 305 | } |
| 306 | |
| 307 | static struct platform_driver mdm_modem_driver = { |
| 308 | .remove = mdm_modem_remove, |
| 309 | .shutdown = mdm_modem_shutdown, |
| 310 | .driver = { |
| 311 | .name = "mdm2_modem", |
| 312 | .owner = THIS_MODULE |
| 313 | }, |
| 314 | }; |
| 315 | |
| 316 | static int __init mdm_modem_init(void) |
| 317 | { |
| 318 | return platform_driver_probe(&mdm_modem_driver, mdm_modem_probe); |
| 319 | } |
| 320 | |
| 321 | static void __exit mdm_modem_exit(void) |
| 322 | { |
| 323 | platform_driver_unregister(&mdm_modem_driver); |
| 324 | } |
| 325 | |
| 326 | module_init(mdm_modem_init); |
| 327 | module_exit(mdm_modem_exit); |
| 328 | |
| 329 | MODULE_LICENSE("GPL v2"); |
| 330 | MODULE_DESCRIPTION("mdm modem driver"); |
| 331 | MODULE_VERSION("2.0"); |
| 332 | MODULE_ALIAS("mdm_modem"); |