Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 1 | /* |
Chris Rorvick | c078a4a | 2015-01-20 02:20:50 -0600 | [diff] [blame] | 2 | * Line 6 Linux USB driver |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 3 | * |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 4 | * Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation, version 2. |
| 9 | * |
| 10 | */ |
| 11 | |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 12 | #include <linux/slab.h> |
Takashi Iwai | ccddbe4 | 2015-01-15 08:22:31 +0100 | [diff] [blame] | 13 | #include <linux/spinlock.h> |
| 14 | #include <linux/usb.h> |
| 15 | #include <linux/wait.h> |
| 16 | #include <linux/module.h> |
| 17 | #include <sound/core.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 18 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 19 | #include "driver.h" |
Takashi Iwai | ccddbe4 | 2015-01-15 08:22:31 +0100 | [diff] [blame] | 20 | #include "usbdefs.h" |
| 21 | |
| 22 | #define VARIAX_STARTUP_DELAY1 1000 |
| 23 | #define VARIAX_STARTUP_DELAY3 100 |
| 24 | #define VARIAX_STARTUP_DELAY4 100 |
| 25 | |
| 26 | /* |
| 27 | Stages of Variax startup procedure |
| 28 | */ |
| 29 | enum { |
| 30 | VARIAX_STARTUP_INIT = 1, |
| 31 | VARIAX_STARTUP_VERSIONREQ, |
| 32 | VARIAX_STARTUP_WAIT, |
| 33 | VARIAX_STARTUP_ACTIVATE, |
| 34 | VARIAX_STARTUP_WORKQUEUE, |
| 35 | VARIAX_STARTUP_SETUP, |
| 36 | VARIAX_STARTUP_LAST = VARIAX_STARTUP_SETUP - 1 |
| 37 | }; |
| 38 | |
| 39 | enum { |
| 40 | LINE6_PODXTLIVE_VARIAX, |
| 41 | LINE6_VARIAX |
| 42 | }; |
| 43 | |
| 44 | struct usb_line6_variax { |
| 45 | /** |
Chris Rorvick | c6fffce | 2015-01-20 02:20:49 -0600 | [diff] [blame] | 46 | Generic Line 6 USB data. |
Takashi Iwai | ccddbe4 | 2015-01-15 08:22:31 +0100 | [diff] [blame] | 47 | */ |
| 48 | struct usb_line6 line6; |
| 49 | |
| 50 | /** |
| 51 | Buffer for activation code. |
| 52 | */ |
| 53 | unsigned char *buffer_activate; |
| 54 | |
| 55 | /** |
| 56 | Handler for device initializaton. |
| 57 | */ |
| 58 | struct work_struct startup_work; |
| 59 | |
| 60 | /** |
| 61 | Timers for device initializaton. |
| 62 | */ |
| 63 | struct timer_list startup_timer1; |
| 64 | struct timer_list startup_timer2; |
| 65 | |
| 66 | /** |
| 67 | Current progress in startup procedure. |
| 68 | */ |
| 69 | int startup_progress; |
| 70 | }; |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 71 | |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 72 | #define VARIAX_OFFSET_ACTIVATE 7 |
| 73 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 74 | /* |
| 75 | This message is sent by the device during initialization and identifies |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 76 | the connected guitar version. |
| 77 | */ |
| 78 | static const char variax_init_version[] = { |
| 79 | 0xf0, 0x7e, 0x7f, 0x06, 0x02, 0x00, 0x01, 0x0c, |
| 80 | 0x07, 0x00, 0x00, 0x00 |
| 81 | }; |
| 82 | |
| 83 | /* |
| 84 | This message is the last one sent by the device during initialization. |
| 85 | */ |
| 86 | static const char variax_init_done[] = { |
| 87 | 0xf0, 0x00, 0x01, 0x0c, 0x07, 0x00, 0x6b |
| 88 | }; |
| 89 | |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 90 | static const char variax_activate[] = { |
| 91 | 0xf0, 0x00, 0x01, 0x0c, 0x07, 0x00, 0x2a, 0x01, |
| 92 | 0xf7 |
| 93 | }; |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 94 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 95 | /* forward declarations: */ |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 96 | static void variax_startup2(unsigned long data); |
| 97 | static void variax_startup4(unsigned long data); |
| 98 | static void variax_startup5(unsigned long data); |
| 99 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 100 | static void variax_activate_async(struct usb_line6_variax *variax, int a) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 101 | { |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 102 | variax->buffer_activate[VARIAX_OFFSET_ACTIVATE] = a; |
Greg Kroah-Hartman | 9cd57f7 | 2009-02-27 22:43:57 -0800 | [diff] [blame] | 103 | line6_send_raw_message_async(&variax->line6, variax->buffer_activate, |
| 104 | sizeof(variax_activate)); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | /* |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 108 | Variax startup procedure. |
| 109 | This is a sequence of functions with special requirements (e.g., must |
| 110 | not run immediately after initialization, must not run in interrupt |
| 111 | context). After the last one has finished, the device is ready to use. |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 112 | */ |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 113 | |
| 114 | static void variax_startup1(struct usb_line6_variax *variax) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 115 | { |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 116 | CHECK_STARTUP_PROGRESS(variax->startup_progress, VARIAX_STARTUP_INIT); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 117 | |
| 118 | /* delay startup procedure: */ |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 119 | line6_start_timer(&variax->startup_timer1, VARIAX_STARTUP_DELAY1, |
| 120 | variax_startup2, (unsigned long)variax); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 121 | } |
| 122 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 123 | static void variax_startup2(unsigned long data) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 124 | { |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 125 | struct usb_line6_variax *variax = (struct usb_line6_variax *)data; |
| 126 | struct usb_line6 *line6 = &variax->line6; |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 127 | |
| 128 | /* schedule another startup procedure until startup is complete: */ |
| 129 | if (variax->startup_progress >= VARIAX_STARTUP_LAST) |
| 130 | return; |
| 131 | |
| 132 | variax->startup_progress = VARIAX_STARTUP_VERSIONREQ; |
| 133 | line6_start_timer(&variax->startup_timer1, VARIAX_STARTUP_DELAY1, |
| 134 | variax_startup2, (unsigned long)variax); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 135 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 136 | /* request firmware version: */ |
| 137 | line6_version_request_async(line6); |
| 138 | } |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 139 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 140 | static void variax_startup3(struct usb_line6_variax *variax) |
| 141 | { |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 142 | CHECK_STARTUP_PROGRESS(variax->startup_progress, VARIAX_STARTUP_WAIT); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 143 | |
| 144 | /* delay startup procedure: */ |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 145 | line6_start_timer(&variax->startup_timer2, VARIAX_STARTUP_DELAY3, |
| 146 | variax_startup4, (unsigned long)variax); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 147 | } |
| 148 | |
| 149 | static void variax_startup4(unsigned long data) |
| 150 | { |
| 151 | struct usb_line6_variax *variax = (struct usb_line6_variax *)data; |
Jerry Snitselaar | f3c5261 | 2014-04-24 00:31:48 -0700 | [diff] [blame] | 152 | |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 153 | CHECK_STARTUP_PROGRESS(variax->startup_progress, |
| 154 | VARIAX_STARTUP_ACTIVATE); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 155 | |
| 156 | /* activate device: */ |
| 157 | variax_activate_async(variax, 1); |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 158 | line6_start_timer(&variax->startup_timer2, VARIAX_STARTUP_DELAY4, |
| 159 | variax_startup5, (unsigned long)variax); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | static void variax_startup5(unsigned long data) |
| 163 | { |
| 164 | struct usb_line6_variax *variax = (struct usb_line6_variax *)data; |
Jerry Snitselaar | f3c5261 | 2014-04-24 00:31:48 -0700 | [diff] [blame] | 165 | |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 166 | CHECK_STARTUP_PROGRESS(variax->startup_progress, |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 167 | VARIAX_STARTUP_WORKQUEUE); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 168 | |
| 169 | /* schedule work for global work queue: */ |
| 170 | schedule_work(&variax->startup_work); |
| 171 | } |
| 172 | |
Stefan Hajnoczi | 323246b | 2012-11-22 20:49:23 +0100 | [diff] [blame] | 173 | static void variax_startup6(struct work_struct *work) |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 174 | { |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 175 | struct usb_line6_variax *variax = |
| 176 | container_of(work, struct usb_line6_variax, startup_work); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 177 | |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 178 | CHECK_STARTUP_PROGRESS(variax->startup_progress, VARIAX_STARTUP_SETUP); |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 179 | |
| 180 | /* ALSA audio interface: */ |
Takashi Iwai | 85a9339 | 2015-01-19 15:54:00 +0100 | [diff] [blame] | 181 | snd_card_register(variax->line6.card); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | /* |
| 185 | Process a completely received message. |
| 186 | */ |
Chris Rorvick | 01f6b2b | 2015-01-12 12:42:58 -0800 | [diff] [blame] | 187 | static void line6_variax_process_message(struct usb_line6 *line6) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 188 | { |
Chris Rorvick | 1cad3e8 | 2015-01-12 12:42:57 -0800 | [diff] [blame] | 189 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 190 | const unsigned char *buf = variax->line6.buffer_message; |
| 191 | |
Greg Kroah-Hartman | 9cd57f7 | 2009-02-27 22:43:57 -0800 | [diff] [blame] | 192 | switch (buf[0]) { |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 193 | case LINE6_RESET: |
| 194 | dev_info(variax->line6.ifcdev, "VARIAX reset\n"); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 195 | break; |
| 196 | |
| 197 | case LINE6_SYSEX_BEGIN: |
Stefan Hajnoczi | 323246b | 2012-11-22 20:49:23 +0100 | [diff] [blame] | 198 | if (memcmp(buf + 1, variax_init_version + 1, |
| 199 | sizeof(variax_init_version) - 1) == 0) { |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 200 | variax_startup3(variax); |
| 201 | } else if (memcmp(buf + 1, variax_init_done + 1, |
| 202 | sizeof(variax_init_done) - 1) == 0) { |
| 203 | /* notify of complete initialization: */ |
| 204 | variax_startup4((unsigned long)variax); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 205 | } |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 206 | break; |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 207 | } |
| 208 | } |
| 209 | |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 210 | /* |
| 211 | Variax destructor. |
| 212 | */ |
Takashi Iwai | f66fd99 | 2015-01-25 18:22:58 +0100 | [diff] [blame^] | 213 | static void line6_variax_disconnect(struct usb_line6 *line6) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 214 | { |
Takashi Iwai | f66fd99 | 2015-01-25 18:22:58 +0100 | [diff] [blame^] | 215 | struct usb_line6_variax *variax = (struct usb_line6_variax *)line6; |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 216 | |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 217 | del_timer(&variax->startup_timer1); |
| 218 | del_timer(&variax->startup_timer2); |
| 219 | cancel_work_sync(&variax->startup_work); |
| 220 | |
Greg Kroah-Hartman | 9cd57f7 | 2009-02-27 22:43:57 -0800 | [diff] [blame] | 221 | kfree(variax->buffer_activate); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | /* |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 225 | Try to init workbench device. |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 226 | */ |
Takashi Iwai | f66fd99 | 2015-01-25 18:22:58 +0100 | [diff] [blame^] | 227 | static int variax_init(struct usb_line6 *line6, |
| 228 | const struct usb_device_id *id) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 229 | { |
Chris Rorvick | a221dd4 | 2015-01-12 12:42:56 -0800 | [diff] [blame] | 230 | struct usb_line6_variax *variax = (struct usb_line6_variax *) line6; |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 231 | int err; |
| 232 | |
Chris Rorvick | 01f6b2b | 2015-01-12 12:42:58 -0800 | [diff] [blame] | 233 | line6->process_message = line6_variax_process_message; |
Chris Rorvick | a46c467 | 2015-01-12 12:42:59 -0800 | [diff] [blame] | 234 | line6->disconnect = line6_variax_disconnect; |
Chris Rorvick | 01f6b2b | 2015-01-12 12:42:58 -0800 | [diff] [blame] | 235 | |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 236 | init_timer(&variax->startup_timer1); |
| 237 | init_timer(&variax->startup_timer2); |
Stefan Hajnoczi | 323246b | 2012-11-22 20:49:23 +0100 | [diff] [blame] | 238 | INIT_WORK(&variax->startup_work, variax_startup6); |
Markus Grabner | e1a164d | 2010-08-23 01:08:25 +0200 | [diff] [blame] | 239 | |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 240 | /* initialize USB buffers: */ |
Julia Lawall | 94002c0 | 2010-05-15 23:21:43 +0200 | [diff] [blame] | 241 | variax->buffer_activate = kmemdup(variax_activate, |
| 242 | sizeof(variax_activate), GFP_KERNEL); |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 243 | |
Takashi Iwai | a019f5e | 2015-01-19 15:05:10 +0100 | [diff] [blame] | 244 | if (variax->buffer_activate == NULL) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 245 | return -ENOMEM; |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 246 | |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 247 | /* initialize MIDI subsystem: */ |
Greg Kroah-Hartman | 9cd57f7 | 2009-02-27 22:43:57 -0800 | [diff] [blame] | 248 | err = line6_init_midi(&variax->line6); |
Greg Kroah-Hartman | 027360c | 2010-09-21 16:58:00 -0700 | [diff] [blame] | 249 | if (err < 0) |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 250 | return err; |
Markus Grabner | 705ecec | 2009-02-27 19:43:04 -0800 | [diff] [blame] | 251 | |
Markus Grabner | 1027f47 | 2010-08-12 01:35:30 +0200 | [diff] [blame] | 252 | /* initiate startup procedure: */ |
| 253 | variax_startup1(variax); |
| 254 | return 0; |
| 255 | } |
| 256 | |
Takashi Iwai | ccddbe4 | 2015-01-15 08:22:31 +0100 | [diff] [blame] | 257 | #define LINE6_DEVICE(prod) USB_DEVICE(0x0e41, prod) |
| 258 | #define LINE6_IF_NUM(prod, n) USB_DEVICE_INTERFACE_NUMBER(0x0e41, prod, n) |
| 259 | |
| 260 | /* table of devices that work with this driver */ |
| 261 | static const struct usb_device_id variax_id_table[] = { |
| 262 | { LINE6_IF_NUM(0x4650, 1), .driver_info = LINE6_PODXTLIVE_VARIAX }, |
| 263 | { LINE6_DEVICE(0x534d), .driver_info = LINE6_VARIAX }, |
| 264 | {} |
| 265 | }; |
| 266 | |
| 267 | MODULE_DEVICE_TABLE(usb, variax_id_table); |
| 268 | |
| 269 | static const struct line6_properties variax_properties_table[] = { |
| 270 | [LINE6_PODXTLIVE_VARIAX] = { |
| 271 | .id = "PODxtLive", |
| 272 | .name = "PODxt Live", |
| 273 | .capabilities = LINE6_CAP_CONTROL |
| 274 | | LINE6_CAP_PCM |
| 275 | | LINE6_CAP_HWMON, |
| 276 | .altsetting = 1, |
| 277 | .ep_ctrl_r = 0x86, |
| 278 | .ep_ctrl_w = 0x05, |
| 279 | .ep_audio_r = 0x82, |
| 280 | .ep_audio_w = 0x01, |
| 281 | }, |
| 282 | [LINE6_VARIAX] = { |
| 283 | .id = "Variax", |
| 284 | .name = "Variax Workbench", |
| 285 | .capabilities = LINE6_CAP_CONTROL, |
| 286 | .altsetting = 1, |
| 287 | .ep_ctrl_r = 0x82, |
| 288 | .ep_ctrl_w = 0x01, |
| 289 | /* no audio channel */ |
| 290 | } |
| 291 | }; |
| 292 | |
| 293 | /* |
| 294 | Probe USB device. |
| 295 | */ |
| 296 | static int variax_probe(struct usb_interface *interface, |
| 297 | const struct usb_device_id *id) |
| 298 | { |
| 299 | struct usb_line6_variax *variax; |
Takashi Iwai | ccddbe4 | 2015-01-15 08:22:31 +0100 | [diff] [blame] | 300 | |
| 301 | variax = kzalloc(sizeof(*variax), GFP_KERNEL); |
| 302 | if (!variax) |
| 303 | return -ENODEV; |
Takashi Iwai | f66fd99 | 2015-01-25 18:22:58 +0100 | [diff] [blame^] | 304 | return line6_probe(interface, id, &variax->line6, |
Takashi Iwai | 85a9339 | 2015-01-19 15:54:00 +0100 | [diff] [blame] | 305 | &variax_properties_table[id->driver_info], |
| 306 | variax_init); |
Takashi Iwai | ccddbe4 | 2015-01-15 08:22:31 +0100 | [diff] [blame] | 307 | } |
| 308 | |
| 309 | static struct usb_driver variax_driver = { |
| 310 | .name = KBUILD_MODNAME, |
| 311 | .probe = variax_probe, |
| 312 | .disconnect = line6_disconnect, |
| 313 | #ifdef CONFIG_PM |
| 314 | .suspend = line6_suspend, |
| 315 | .resume = line6_resume, |
| 316 | .reset_resume = line6_resume, |
| 317 | #endif |
| 318 | .id_table = variax_id_table, |
| 319 | }; |
| 320 | |
| 321 | module_usb_driver(variax_driver); |
| 322 | |
| 323 | MODULE_DESCRIPTION("Vairax Workbench USB driver"); |
| 324 | MODULE_LICENSE("GPL"); |