dsbr100.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. /* A driver for the D-Link DSB-R100 USB radio and Gemtek USB Radio 21.
  2. The device plugs into both the USB and an analog audio input, so this thing
  3. only deals with initialisation and frequency setting, the
  4. audio data has to be handled by a sound driver.
  5. Major issue: I can't find out where the device reports the signal
  6. strength, and indeed the windows software appearantly just looks
  7. at the stereo indicator as well. So, scanning will only find
  8. stereo stations. Sad, but I can't help it.
  9. Also, the windows program sends oodles of messages over to the
  10. device, and I couldn't figure out their meaning. My suspicion
  11. is that they don't have any:-)
  12. You might find some interesting stuff about this module at
  13. http://unimut.fsk.uni-heidelberg.de/unimut/demi/dsbr
  14. Copyright (c) 2000 Markus Demleitner <msdemlei@cl.uni-heidelberg.de>
  15. This program is free software; you can redistribute it and/or modify
  16. it under the terms of the GNU General Public License as published by
  17. the Free Software Foundation; either version 2 of the License, or
  18. (at your option) any later version.
  19. This program is distributed in the hope that it will be useful,
  20. but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. GNU General Public License for more details.
  23. You should have received a copy of the GNU General Public License
  24. along with this program; if not, write to the Free Software
  25. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  26. History:
  27. Version 0.46:
  28. Removed usb_dsbr100_open/close calls and radio->users counter. Also,
  29. radio->muted changed to radio->status and suspend/resume calls updated.
  30. Version 0.45:
  31. Converted to v4l2_device.
  32. Version 0.44:
  33. Add suspend/resume functions, fix unplug of device,
  34. a lot of cleanups and fixes by Alexey Klimov <klimov.linux@gmail.com>
  35. Version 0.43:
  36. Oliver Neukum: avoided DMA coherency issue
  37. Version 0.42:
  38. Converted dsbr100 to use video_ioctl2
  39. by Douglas Landgraf <dougsland@gmail.com>
  40. Version 0.41-ac1:
  41. Alan Cox: Some cleanups and fixes
  42. Version 0.41:
  43. Converted to V4L2 API by Mauro Carvalho Chehab <mchehab@infradead.org>
  44. Version 0.40:
  45. Markus: Updates for 2.6.x kernels, code layout changes, name sanitizing
  46. Version 0.30:
  47. Markus: Updates for 2.5.x kernel and more ISO compliant source
  48. Version 0.25:
  49. PSL and Markus: Cleanup, radio now doesn't stop on device close
  50. Version 0.24:
  51. Markus: Hope I got these silly VIDEO_TUNER_LOW issues finally
  52. right. Some minor cleanup, improved standalone compilation
  53. Version 0.23:
  54. Markus: Sign extension bug fixed by declaring transfer_buffer unsigned
  55. Version 0.22:
  56. Markus: Some (brown bag) cleanup in what VIDIOCSTUNER returns,
  57. thanks to Mike Cox for pointing the problem out.
  58. Version 0.21:
  59. Markus: Minor cleanup, warnings if something goes wrong, lame attempt
  60. to adhere to Documentation/CodingStyle
  61. Version 0.2:
  62. Brad Hards <bradh@dynamite.com.au>: Fixes to make it work as non-module
  63. Markus: Copyright clarification
  64. Version 0.01: Markus: initial release
  65. */
  66. #include <linux/kernel.h>
  67. #include <linux/module.h>
  68. #include <linux/init.h>
  69. #include <linux/slab.h>
  70. #include <linux/input.h>
  71. #include <linux/videodev2.h>
  72. #include <media/v4l2-device.h>
  73. #include <media/v4l2-ioctl.h>
  74. #include <linux/usb.h>
  75. /*
  76. * Version Information
  77. */
  78. #define DRIVER_VERSION "0.4.7"
  79. #define DRIVER_AUTHOR "Markus Demleitner <msdemlei@tucana.harvard.edu>"
  80. #define DRIVER_DESC "D-Link DSB-R100 USB FM radio driver"
  81. #define DSB100_VENDOR 0x04b4
  82. #define DSB100_PRODUCT 0x1002
  83. /* Commands the device appears to understand */
  84. #define DSB100_TUNE 1
  85. #define DSB100_ONOFF 2
  86. #define TB_LEN 16
  87. /* Frequency limits in MHz -- these are European values. For Japanese
  88. devices, that would be 76 and 91. */
  89. #define FREQ_MIN 87.5
  90. #define FREQ_MAX 108.0
  91. #define FREQ_MUL 16000
  92. /* defines for radio->status */
  93. #define STARTED 0
  94. #define STOPPED 1
  95. #define v4l2_dev_to_radio(d) container_of(d, struct dsbr100_device, v4l2_dev)
  96. static int usb_dsbr100_probe(struct usb_interface *intf,
  97. const struct usb_device_id *id);
  98. static void usb_dsbr100_disconnect(struct usb_interface *intf);
  99. static int usb_dsbr100_suspend(struct usb_interface *intf,
  100. pm_message_t message);
  101. static int usb_dsbr100_resume(struct usb_interface *intf);
  102. static int radio_nr = -1;
  103. module_param(radio_nr, int, 0);
  104. /* Data for one (physical) device */
  105. struct dsbr100_device {
  106. struct usb_device *usbdev;
  107. struct video_device videodev;
  108. struct v4l2_device v4l2_dev;
  109. u8 *transfer_buffer;
  110. struct mutex v4l2_lock;
  111. int curfreq;
  112. int stereo;
  113. int status;
  114. };
  115. static struct usb_device_id usb_dsbr100_device_table [] = {
  116. { USB_DEVICE(DSB100_VENDOR, DSB100_PRODUCT) },
  117. { } /* Terminating entry */
  118. };
  119. MODULE_DEVICE_TABLE (usb, usb_dsbr100_device_table);
  120. /* USB subsystem interface */
  121. static struct usb_driver usb_dsbr100_driver = {
  122. .name = "dsbr100",
  123. .probe = usb_dsbr100_probe,
  124. .disconnect = usb_dsbr100_disconnect,
  125. .id_table = usb_dsbr100_device_table,
  126. .suspend = usb_dsbr100_suspend,
  127. .resume = usb_dsbr100_resume,
  128. .reset_resume = usb_dsbr100_resume,
  129. .supports_autosuspend = 0,
  130. };
  131. /* Low-level device interface begins here */
  132. /* switch on radio */
  133. static int dsbr100_start(struct dsbr100_device *radio)
  134. {
  135. int retval;
  136. int request;
  137. retval = usb_control_msg(radio->usbdev,
  138. usb_rcvctrlpipe(radio->usbdev, 0),
  139. USB_REQ_GET_STATUS,
  140. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  141. 0x00, 0xC7, radio->transfer_buffer, 8, 300);
  142. if (retval < 0) {
  143. request = USB_REQ_GET_STATUS;
  144. goto usb_control_msg_failed;
  145. }
  146. retval = usb_control_msg(radio->usbdev,
  147. usb_rcvctrlpipe(radio->usbdev, 0),
  148. DSB100_ONOFF,
  149. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  150. 0x01, 0x00, radio->transfer_buffer, 8, 300);
  151. if (retval < 0) {
  152. request = DSB100_ONOFF;
  153. goto usb_control_msg_failed;
  154. }
  155. radio->status = STARTED;
  156. return (radio->transfer_buffer)[0];
  157. usb_control_msg_failed:
  158. dev_err(&radio->usbdev->dev,
  159. "%s - usb_control_msg returned %i, request %i\n",
  160. __func__, retval, request);
  161. return retval;
  162. }
  163. /* switch off radio */
  164. static int dsbr100_stop(struct dsbr100_device *radio)
  165. {
  166. int retval;
  167. int request;
  168. retval = usb_control_msg(radio->usbdev,
  169. usb_rcvctrlpipe(radio->usbdev, 0),
  170. USB_REQ_GET_STATUS,
  171. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  172. 0x16, 0x1C, radio->transfer_buffer, 8, 300);
  173. if (retval < 0) {
  174. request = USB_REQ_GET_STATUS;
  175. goto usb_control_msg_failed;
  176. }
  177. retval = usb_control_msg(radio->usbdev,
  178. usb_rcvctrlpipe(radio->usbdev, 0),
  179. DSB100_ONOFF,
  180. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  181. 0x00, 0x00, radio->transfer_buffer, 8, 300);
  182. if (retval < 0) {
  183. request = DSB100_ONOFF;
  184. goto usb_control_msg_failed;
  185. }
  186. radio->status = STOPPED;
  187. return (radio->transfer_buffer)[0];
  188. usb_control_msg_failed:
  189. dev_err(&radio->usbdev->dev,
  190. "%s - usb_control_msg returned %i, request %i\n",
  191. __func__, retval, request);
  192. return retval;
  193. }
  194. /* set a frequency, freq is defined by v4l's TUNER_LOW, i.e. 1/16th kHz */
  195. static int dsbr100_setfreq(struct dsbr100_device *radio)
  196. {
  197. int retval;
  198. int request;
  199. int freq = (radio->curfreq / 16 * 80) / 1000 + 856;
  200. retval = usb_control_msg(radio->usbdev,
  201. usb_rcvctrlpipe(radio->usbdev, 0),
  202. DSB100_TUNE,
  203. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  204. (freq >> 8) & 0x00ff, freq & 0xff,
  205. radio->transfer_buffer, 8, 300);
  206. if (retval < 0) {
  207. request = DSB100_TUNE;
  208. goto usb_control_msg_failed;
  209. }
  210. retval = usb_control_msg(radio->usbdev,
  211. usb_rcvctrlpipe(radio->usbdev, 0),
  212. USB_REQ_GET_STATUS,
  213. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  214. 0x96, 0xB7, radio->transfer_buffer, 8, 300);
  215. if (retval < 0) {
  216. request = USB_REQ_GET_STATUS;
  217. goto usb_control_msg_failed;
  218. }
  219. retval = usb_control_msg(radio->usbdev,
  220. usb_rcvctrlpipe(radio->usbdev, 0),
  221. USB_REQ_GET_STATUS,
  222. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  223. 0x00, 0x24, radio->transfer_buffer, 8, 300);
  224. if (retval < 0) {
  225. request = USB_REQ_GET_STATUS;
  226. goto usb_control_msg_failed;
  227. }
  228. radio->stereo = !((radio->transfer_buffer)[0] & 0x01);
  229. return (radio->transfer_buffer)[0];
  230. usb_control_msg_failed:
  231. radio->stereo = -1;
  232. dev_err(&radio->usbdev->dev,
  233. "%s - usb_control_msg returned %i, request %i\n",
  234. __func__, retval, request);
  235. return retval;
  236. }
  237. /* return the device status. This is, in effect, just whether it
  238. sees a stereo signal or not. Pity. */
  239. static void dsbr100_getstat(struct dsbr100_device *radio)
  240. {
  241. int retval;
  242. retval = usb_control_msg(radio->usbdev,
  243. usb_rcvctrlpipe(radio->usbdev, 0),
  244. USB_REQ_GET_STATUS,
  245. USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
  246. 0x00 , 0x24, radio->transfer_buffer, 8, 300);
  247. if (retval < 0) {
  248. radio->stereo = -1;
  249. dev_err(&radio->usbdev->dev,
  250. "%s - usb_control_msg returned %i, request %i\n",
  251. __func__, retval, USB_REQ_GET_STATUS);
  252. } else {
  253. radio->stereo = !(radio->transfer_buffer[0] & 0x01);
  254. }
  255. }
  256. static int vidioc_querycap(struct file *file, void *priv,
  257. struct v4l2_capability *v)
  258. {
  259. struct dsbr100_device *radio = video_drvdata(file);
  260. strlcpy(v->driver, "dsbr100", sizeof(v->driver));
  261. strlcpy(v->card, "D-Link R-100 USB FM Radio", sizeof(v->card));
  262. usb_make_path(radio->usbdev, v->bus_info, sizeof(v->bus_info));
  263. v->capabilities = V4L2_CAP_TUNER;
  264. return 0;
  265. }
  266. static int vidioc_g_tuner(struct file *file, void *priv,
  267. struct v4l2_tuner *v)
  268. {
  269. struct dsbr100_device *radio = video_drvdata(file);
  270. if (v->index > 0)
  271. return -EINVAL;
  272. dsbr100_getstat(radio);
  273. strcpy(v->name, "FM");
  274. v->type = V4L2_TUNER_RADIO;
  275. v->rangelow = FREQ_MIN * FREQ_MUL;
  276. v->rangehigh = FREQ_MAX * FREQ_MUL;
  277. v->rxsubchans = V4L2_TUNER_SUB_MONO | V4L2_TUNER_SUB_STEREO;
  278. v->capability = V4L2_TUNER_CAP_LOW;
  279. if(radio->stereo)
  280. v->audmode = V4L2_TUNER_MODE_STEREO;
  281. else
  282. v->audmode = V4L2_TUNER_MODE_MONO;
  283. v->signal = 0xffff; /* We can't get the signal strength */
  284. return 0;
  285. }
  286. static int vidioc_s_tuner(struct file *file, void *priv,
  287. struct v4l2_tuner *v)
  288. {
  289. return v->index ? -EINVAL : 0;
  290. }
  291. static int vidioc_s_frequency(struct file *file, void *priv,
  292. struct v4l2_frequency *f)
  293. {
  294. struct dsbr100_device *radio = video_drvdata(file);
  295. int retval;
  296. radio->curfreq = f->frequency;
  297. retval = dsbr100_setfreq(radio);
  298. if (retval < 0)
  299. dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
  300. return 0;
  301. }
  302. static int vidioc_g_frequency(struct file *file, void *priv,
  303. struct v4l2_frequency *f)
  304. {
  305. struct dsbr100_device *radio = video_drvdata(file);
  306. f->type = V4L2_TUNER_RADIO;
  307. f->frequency = radio->curfreq;
  308. return 0;
  309. }
  310. static int vidioc_queryctrl(struct file *file, void *priv,
  311. struct v4l2_queryctrl *qc)
  312. {
  313. switch (qc->id) {
  314. case V4L2_CID_AUDIO_MUTE:
  315. return v4l2_ctrl_query_fill(qc, 0, 1, 1, 1);
  316. }
  317. return -EINVAL;
  318. }
  319. static int vidioc_g_ctrl(struct file *file, void *priv,
  320. struct v4l2_control *ctrl)
  321. {
  322. struct dsbr100_device *radio = video_drvdata(file);
  323. switch (ctrl->id) {
  324. case V4L2_CID_AUDIO_MUTE:
  325. ctrl->value = radio->status;
  326. return 0;
  327. }
  328. return -EINVAL;
  329. }
  330. static int vidioc_s_ctrl(struct file *file, void *priv,
  331. struct v4l2_control *ctrl)
  332. {
  333. struct dsbr100_device *radio = video_drvdata(file);
  334. int retval;
  335. switch (ctrl->id) {
  336. case V4L2_CID_AUDIO_MUTE:
  337. if (ctrl->value) {
  338. retval = dsbr100_stop(radio);
  339. if (retval < 0) {
  340. dev_warn(&radio->usbdev->dev,
  341. "Radio did not respond properly\n");
  342. return -EBUSY;
  343. }
  344. } else {
  345. retval = dsbr100_start(radio);
  346. if (retval < 0) {
  347. dev_warn(&radio->usbdev->dev,
  348. "Radio did not respond properly\n");
  349. return -EBUSY;
  350. }
  351. }
  352. return 0;
  353. }
  354. return -EINVAL;
  355. }
  356. static int vidioc_g_audio(struct file *file, void *priv,
  357. struct v4l2_audio *a)
  358. {
  359. if (a->index > 1)
  360. return -EINVAL;
  361. strcpy(a->name, "Radio");
  362. a->capability = V4L2_AUDCAP_STEREO;
  363. return 0;
  364. }
  365. static int vidioc_g_input(struct file *filp, void *priv, unsigned int *i)
  366. {
  367. *i = 0;
  368. return 0;
  369. }
  370. static int vidioc_s_input(struct file *filp, void *priv, unsigned int i)
  371. {
  372. return i ? -EINVAL : 0;
  373. }
  374. static int vidioc_s_audio(struct file *file, void *priv,
  375. struct v4l2_audio *a)
  376. {
  377. return a->index ? -EINVAL : 0;
  378. }
  379. /* USB subsystem interface begins here */
  380. /*
  381. * Handle unplugging of the device.
  382. * We call video_unregister_device in any case.
  383. * The last function called in this procedure is
  384. * usb_dsbr100_video_device_release
  385. */
  386. static void usb_dsbr100_disconnect(struct usb_interface *intf)
  387. {
  388. struct dsbr100_device *radio = usb_get_intfdata(intf);
  389. v4l2_device_get(&radio->v4l2_dev);
  390. mutex_lock(&radio->v4l2_lock);
  391. usb_set_intfdata(intf, NULL);
  392. video_unregister_device(&radio->videodev);
  393. v4l2_device_disconnect(&radio->v4l2_dev);
  394. mutex_unlock(&radio->v4l2_lock);
  395. v4l2_device_put(&radio->v4l2_dev);
  396. }
  397. /* Suspend device - stop device. */
  398. static int usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message)
  399. {
  400. struct dsbr100_device *radio = usb_get_intfdata(intf);
  401. int retval;
  402. mutex_lock(&radio->v4l2_lock);
  403. if (radio->status == STARTED) {
  404. retval = dsbr100_stop(radio);
  405. if (retval < 0)
  406. dev_warn(&intf->dev, "dsbr100_stop failed\n");
  407. /* After dsbr100_stop() status set to STOPPED.
  408. * If we want driver to start radio on resume
  409. * we set status equal to STARTED.
  410. * On resume we will check status and run radio if needed.
  411. */
  412. radio->status = STARTED;
  413. }
  414. mutex_unlock(&radio->v4l2_lock);
  415. dev_info(&intf->dev, "going into suspend..\n");
  416. return 0;
  417. }
  418. /* Resume device - start device. */
  419. static int usb_dsbr100_resume(struct usb_interface *intf)
  420. {
  421. struct dsbr100_device *radio = usb_get_intfdata(intf);
  422. int retval;
  423. mutex_lock(&radio->v4l2_lock);
  424. if (radio->status == STARTED) {
  425. retval = dsbr100_start(radio);
  426. if (retval < 0)
  427. dev_warn(&intf->dev, "dsbr100_start failed\n");
  428. }
  429. mutex_unlock(&radio->v4l2_lock);
  430. dev_info(&intf->dev, "coming out of suspend..\n");
  431. return 0;
  432. }
  433. /* free data structures */
  434. static void usb_dsbr100_release(struct v4l2_device *v4l2_dev)
  435. {
  436. struct dsbr100_device *radio = v4l2_dev_to_radio(v4l2_dev);
  437. v4l2_device_unregister(&radio->v4l2_dev);
  438. kfree(radio->transfer_buffer);
  439. kfree(radio);
  440. }
  441. /* File system interface */
  442. static const struct v4l2_file_operations usb_dsbr100_fops = {
  443. .owner = THIS_MODULE,
  444. .unlocked_ioctl = video_ioctl2,
  445. };
  446. static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = {
  447. .vidioc_querycap = vidioc_querycap,
  448. .vidioc_g_tuner = vidioc_g_tuner,
  449. .vidioc_s_tuner = vidioc_s_tuner,
  450. .vidioc_g_frequency = vidioc_g_frequency,
  451. .vidioc_s_frequency = vidioc_s_frequency,
  452. .vidioc_queryctrl = vidioc_queryctrl,
  453. .vidioc_g_ctrl = vidioc_g_ctrl,
  454. .vidioc_s_ctrl = vidioc_s_ctrl,
  455. .vidioc_g_audio = vidioc_g_audio,
  456. .vidioc_s_audio = vidioc_s_audio,
  457. .vidioc_g_input = vidioc_g_input,
  458. .vidioc_s_input = vidioc_s_input,
  459. };
  460. /* check if the device is present and register with v4l and usb if it is */
  461. static int usb_dsbr100_probe(struct usb_interface *intf,
  462. const struct usb_device_id *id)
  463. {
  464. struct dsbr100_device *radio;
  465. struct v4l2_device *v4l2_dev;
  466. int retval;
  467. radio = kzalloc(sizeof(struct dsbr100_device), GFP_KERNEL);
  468. if (!radio)
  469. return -ENOMEM;
  470. radio->transfer_buffer = kmalloc(TB_LEN, GFP_KERNEL);
  471. if (!(radio->transfer_buffer)) {
  472. kfree(radio);
  473. return -ENOMEM;
  474. }
  475. v4l2_dev = &radio->v4l2_dev;
  476. v4l2_dev->release = usb_dsbr100_release;
  477. retval = v4l2_device_register(&intf->dev, v4l2_dev);
  478. if (retval < 0) {
  479. v4l2_err(v4l2_dev, "couldn't register v4l2_device\n");
  480. kfree(radio->transfer_buffer);
  481. kfree(radio);
  482. return retval;
  483. }
  484. mutex_init(&radio->v4l2_lock);
  485. strlcpy(radio->videodev.name, v4l2_dev->name, sizeof(radio->videodev.name));
  486. radio->videodev.v4l2_dev = v4l2_dev;
  487. radio->videodev.fops = &usb_dsbr100_fops;
  488. radio->videodev.ioctl_ops = &usb_dsbr100_ioctl_ops;
  489. radio->videodev.release = video_device_release_empty;
  490. radio->videodev.lock = &radio->v4l2_lock;
  491. radio->usbdev = interface_to_usbdev(intf);
  492. radio->curfreq = FREQ_MIN * FREQ_MUL;
  493. radio->status = STOPPED;
  494. video_set_drvdata(&radio->videodev, radio);
  495. retval = video_register_device(&radio->videodev, VFL_TYPE_RADIO, radio_nr);
  496. if (retval < 0) {
  497. v4l2_err(v4l2_dev, "couldn't register video device\n");
  498. v4l2_device_unregister(v4l2_dev);
  499. kfree(radio->transfer_buffer);
  500. kfree(radio);
  501. return -EIO;
  502. }
  503. usb_set_intfdata(intf, radio);
  504. return 0;
  505. }
  506. module_usb_driver(usb_dsbr100_driver);
  507. MODULE_AUTHOR( DRIVER_AUTHOR );
  508. MODULE_DESCRIPTION( DRIVER_DESC );
  509. MODULE_LICENSE("GPL");
  510. MODULE_VERSION(DRIVER_VERSION);