2 * KOBIL USB Smart Card Terminal Driver
4 * Copyright (C) 2002 KOBIL Systems GmbH
5 * Author: Thomas Wahrenbruch
7 * Contact: linuxusb@kobil.de
9 * This program is largely derived from work by the linux-usb group
10 * and associated source files. Please see the usb/serial files for
11 * individual credits and copyrights.
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * Thanks to Greg Kroah-Hartman (greg@kroah.com) for his help and
21 * Supported readers: USB TWIN, KAAN Standard Plus and SecOVID Reader Plus
22 * (Adapter K), B1 Professional and KAAN Professional (Adapter B)
26 #include <linux/kernel.h>
27 #include <linux/errno.h>
28 #include <linux/init.h>
29 #include <linux/slab.h>
30 #include <linux/tty.h>
31 #include <linux/tty_driver.h>
32 #include <linux/tty_flip.h>
33 #include <linux/module.h>
34 #include <linux/spinlock.h>
35 #include <linux/uaccess.h>
36 #include <linux/usb.h>
37 #include <linux/usb/serial.h>
38 #include <linux/ioctl.h>
39 #include "kobil_sct.h"
43 /* Version Information */
44 #define DRIVER_VERSION "21/05/2004"
45 #define DRIVER_AUTHOR "KOBIL Systems GmbH - http://www.kobil.com"
46 #define DRIVER_DESC "KOBIL USB Smart Card Terminal Driver (experimental)"
48 #define KOBIL_VENDOR_ID 0x0D46
49 #define KOBIL_ADAPTER_B_PRODUCT_ID 0x2011
50 #define KOBIL_ADAPTER_K_PRODUCT_ID 0x2012
51 #define KOBIL_USBTWIN_PRODUCT_ID 0x0078
52 #define KOBIL_KAAN_SIM_PRODUCT_ID 0x0081
54 #define KOBIL_TIMEOUT 500
55 #define KOBIL_BUF_LENGTH 300
58 /* Function prototypes */
59 static int kobil_startup(struct usb_serial
*serial
);
60 static void kobil_release(struct usb_serial
*serial
);
61 static int kobil_open(struct tty_struct
*tty
, struct usb_serial_port
*port
);
62 static void kobil_close(struct usb_serial_port
*port
);
63 static int kobil_write(struct tty_struct
*tty
, struct usb_serial_port
*port
,
64 const unsigned char *buf
, int count
);
65 static int kobil_write_room(struct tty_struct
*tty
);
66 static int kobil_ioctl(struct tty_struct
*tty
,
67 unsigned int cmd
, unsigned long arg
);
68 static int kobil_tiocmget(struct tty_struct
*tty
);
69 static int kobil_tiocmset(struct tty_struct
*tty
,
70 unsigned int set
, unsigned int clear
);
71 static void kobil_read_int_callback(struct urb
*urb
);
72 static void kobil_write_callback(struct urb
*purb
);
73 static void kobil_set_termios(struct tty_struct
*tty
,
74 struct usb_serial_port
*port
, struct ktermios
*old
);
75 static void kobil_init_termios(struct tty_struct
*tty
);
77 static const struct usb_device_id id_table
[] = {
78 { USB_DEVICE(KOBIL_VENDOR_ID
, KOBIL_ADAPTER_B_PRODUCT_ID
) },
79 { USB_DEVICE(KOBIL_VENDOR_ID
, KOBIL_ADAPTER_K_PRODUCT_ID
) },
80 { USB_DEVICE(KOBIL_VENDOR_ID
, KOBIL_USBTWIN_PRODUCT_ID
) },
81 { USB_DEVICE(KOBIL_VENDOR_ID
, KOBIL_KAAN_SIM_PRODUCT_ID
) },
82 { } /* Terminating entry */
86 MODULE_DEVICE_TABLE(usb
, id_table
);
88 static struct usb_driver kobil_driver
= {
90 .probe
= usb_serial_probe
,
91 .disconnect
= usb_serial_disconnect
,
97 static struct usb_serial_driver kobil_device
= {
102 .description
= "KOBIL USB smart card terminal",
103 .usb_driver
= &kobil_driver
,
104 .id_table
= id_table
,
106 .attach
= kobil_startup
,
107 .release
= kobil_release
,
108 .ioctl
= kobil_ioctl
,
109 .set_termios
= kobil_set_termios
,
110 .init_termios
= kobil_init_termios
,
111 .tiocmget
= kobil_tiocmget
,
112 .tiocmset
= kobil_tiocmset
,
114 .close
= kobil_close
,
115 .write
= kobil_write
,
116 .write_room
= kobil_write_room
,
117 .read_int_callback
= kobil_read_int_callback
,
121 struct kobil_private
{
122 int write_int_endpoint_address
;
123 int read_int_endpoint_address
;
124 unsigned char buf
[KOBIL_BUF_LENGTH
]; /* buffer for the APDU to send */
125 int filled
; /* index of the last char in buf */
126 int cur_pos
; /* index of the next char to send in buf */
131 static int kobil_startup(struct usb_serial
*serial
)
134 struct kobil_private
*priv
;
135 struct usb_device
*pdev
;
136 struct usb_host_config
*actconfig
;
137 struct usb_interface
*interface
;
138 struct usb_host_interface
*altsetting
;
139 struct usb_host_endpoint
*endpoint
;
141 priv
= kmalloc(sizeof(struct kobil_private
), GFP_KERNEL
);
147 priv
->device_type
= le16_to_cpu(serial
->dev
->descriptor
.idProduct
);
149 switch (priv
->device_type
) {
150 case KOBIL_ADAPTER_B_PRODUCT_ID
:
151 printk(KERN_DEBUG
"KOBIL B1 PRO / KAAN PRO detected\n");
153 case KOBIL_ADAPTER_K_PRODUCT_ID
:
155 "KOBIL KAAN Standard Plus / SecOVID Reader Plus detected\n");
157 case KOBIL_USBTWIN_PRODUCT_ID
:
158 printk(KERN_DEBUG
"KOBIL USBTWIN detected\n");
160 case KOBIL_KAAN_SIM_PRODUCT_ID
:
161 printk(KERN_DEBUG
"KOBIL KAAN SIM detected\n");
164 usb_set_serial_port_data(serial
->port
[0], priv
);
166 /* search for the necessary endpoints */
168 actconfig
= pdev
->actconfig
;
169 interface
= actconfig
->interface
[0];
170 altsetting
= interface
->cur_altsetting
;
171 endpoint
= altsetting
->endpoint
;
173 for (i
= 0; i
< altsetting
->desc
.bNumEndpoints
; i
++) {
174 endpoint
= &altsetting
->endpoint
[i
];
175 if (usb_endpoint_is_int_out(&endpoint
->desc
)) {
176 dbg("%s Found interrupt out endpoint. Address: %d",
177 __func__
, endpoint
->desc
.bEndpointAddress
);
178 priv
->write_int_endpoint_address
=
179 endpoint
->desc
.bEndpointAddress
;
181 if (usb_endpoint_is_int_in(&endpoint
->desc
)) {
182 dbg("%s Found interrupt in endpoint. Address: %d",
183 __func__
, endpoint
->desc
.bEndpointAddress
);
184 priv
->read_int_endpoint_address
=
185 endpoint
->desc
.bEndpointAddress
;
192 static void kobil_release(struct usb_serial
*serial
)
195 dbg("%s - port %d", __func__
, serial
->port
[0]->number
);
197 for (i
= 0; i
< serial
->num_ports
; ++i
)
198 kfree(usb_get_serial_port_data(serial
->port
[i
]));
201 static void kobil_init_termios(struct tty_struct
*tty
)
203 /* Default to echo off and other sane device settings */
204 tty
->termios
->c_lflag
= 0;
205 tty
->termios
->c_lflag
&= ~(ISIG
| ICANON
| ECHO
| IEXTEN
| XCASE
);
206 tty
->termios
->c_iflag
= IGNBRK
| IGNPAR
| IXOFF
;
207 /* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
208 tty
->termios
->c_oflag
&= ~ONLCR
;
211 static int kobil_open(struct tty_struct
*tty
, struct usb_serial_port
*port
)
214 struct kobil_private
*priv
;
215 unsigned char *transfer_buffer
;
216 int transfer_buffer_length
= 8;
217 int write_urb_transfer_buffer_length
= 8;
219 dbg("%s - port %d", __func__
, port
->number
);
220 priv
= usb_get_serial_port_data(port
);
222 /* allocate memory for transfer buffer */
223 transfer_buffer
= kzalloc(transfer_buffer_length
, GFP_KERNEL
);
224 if (!transfer_buffer
)
227 /* allocate write_urb */
228 if (!port
->write_urb
) {
229 dbg("%s - port %d Allocating port->write_urb",
230 __func__
, port
->number
);
231 port
->write_urb
= usb_alloc_urb(0, GFP_KERNEL
);
232 if (!port
->write_urb
) {
233 dbg("%s - port %d usb_alloc_urb failed",
234 __func__
, port
->number
);
235 kfree(transfer_buffer
);
240 /* allocate memory for write_urb transfer buffer */
241 port
->write_urb
->transfer_buffer
=
242 kmalloc(write_urb_transfer_buffer_length
, GFP_KERNEL
);
243 if (!port
->write_urb
->transfer_buffer
) {
244 kfree(transfer_buffer
);
245 usb_free_urb(port
->write_urb
);
246 port
->write_urb
= NULL
;
250 /* get hardware version */
251 result
= usb_control_msg(port
->serial
->dev
,
252 usb_rcvctrlpipe(port
->serial
->dev
, 0),
253 SUSBCRequest_GetMisc
,
254 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_IN
,
255 SUSBCR_MSC_GetHWVersion
,
258 transfer_buffer_length
,
261 dbg("%s - port %d Send get_HW_version URB returns: %i",
262 __func__
, port
->number
, result
);
263 dbg("Harware version: %i.%i.%i",
264 transfer_buffer
[0], transfer_buffer
[1], transfer_buffer
[2]);
266 /* get firmware version */
267 result
= usb_control_msg(port
->serial
->dev
,
268 usb_rcvctrlpipe(port
->serial
->dev
, 0),
269 SUSBCRequest_GetMisc
,
270 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_IN
,
271 SUSBCR_MSC_GetFWVersion
,
274 transfer_buffer_length
,
277 dbg("%s - port %d Send get_FW_version URB returns: %i",
278 __func__
, port
->number
, result
);
279 dbg("Firmware version: %i.%i.%i",
280 transfer_buffer
[0], transfer_buffer
[1], transfer_buffer
[2]);
282 if (priv
->device_type
== KOBIL_ADAPTER_B_PRODUCT_ID
||
283 priv
->device_type
== KOBIL_ADAPTER_K_PRODUCT_ID
) {
284 /* Setting Baudrate, Parity and Stopbits */
285 result
= usb_control_msg(port
->serial
->dev
,
286 usb_rcvctrlpipe(port
->serial
->dev
, 0),
287 SUSBCRequest_SetBaudRateParityAndStopBits
,
288 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_OUT
,
289 SUSBCR_SBR_9600
| SUSBCR_SPASB_EvenParity
|
290 SUSBCR_SPASB_1StopBit
,
296 dbg("%s - port %d Send set_baudrate URB returns: %i",
297 __func__
, port
->number
, result
);
299 /* reset all queues */
300 result
= usb_control_msg(port
->serial
->dev
,
301 usb_rcvctrlpipe(port
->serial
->dev
, 0),
303 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_OUT
,
304 SUSBCR_MSC_ResetAllQueues
,
310 dbg("%s - port %d Send reset_all_queues URB returns: %i",
311 __func__
, port
->number
, result
);
313 if (priv
->device_type
== KOBIL_USBTWIN_PRODUCT_ID
||
314 priv
->device_type
== KOBIL_ADAPTER_B_PRODUCT_ID
||
315 priv
->device_type
== KOBIL_KAAN_SIM_PRODUCT_ID
) {
316 /* start reading (Adapter B 'cause PNP string) */
317 result
= usb_submit_urb(port
->interrupt_in_urb
, GFP_ATOMIC
);
318 dbg("%s - port %d Send read URB returns: %i",
319 __func__
, port
->number
, result
);
322 kfree(transfer_buffer
);
327 static void kobil_close(struct usb_serial_port
*port
)
329 dbg("%s - port %d", __func__
, port
->number
);
331 /* FIXME: Add rts/dtr methods */
332 if (port
->write_urb
) {
333 usb_poison_urb(port
->write_urb
);
334 kfree(port
->write_urb
->transfer_buffer
);
335 usb_free_urb(port
->write_urb
);
336 port
->write_urb
= NULL
;
338 usb_kill_urb(port
->interrupt_in_urb
);
342 static void kobil_read_int_callback(struct urb
*urb
)
345 struct usb_serial_port
*port
= urb
->context
;
346 struct tty_struct
*tty
;
347 unsigned char *data
= urb
->transfer_buffer
;
348 int status
= urb
->status
;
349 /* char *dbg_data; */
351 dbg("%s - port %d", __func__
, port
->number
);
354 dbg("%s - port %d Read int status not zero: %d",
355 __func__
, port
->number
, status
);
359 tty
= tty_port_tty_get(&port
->port
);
360 if (tty
&& urb
->actual_length
) {
364 dbg_data = kzalloc((3 * purb->actual_length + 10)
365 * sizeof(char), GFP_KERNEL);
369 for (i = 0; i < purb->actual_length; i++) {
370 sprintf(dbg_data +3*i, "%02X ", data[i]);
372 dbg(" <-- %s", dbg_data);
377 tty_insert_flip_string(tty
, data
, urb
->actual_length
);
378 tty_flip_buffer_push(tty
);
382 result
= usb_submit_urb(port
->interrupt_in_urb
, GFP_ATOMIC
);
383 dbg("%s - port %d Send read URB returns: %i",
384 __func__
, port
->number
, result
);
388 static void kobil_write_callback(struct urb
*purb
)
393 static int kobil_write(struct tty_struct
*tty
, struct usb_serial_port
*port
,
394 const unsigned char *buf
, int count
)
399 struct kobil_private
*priv
;
402 dbg("%s - port %d write request of 0 bytes",
403 __func__
, port
->number
);
407 priv
= usb_get_serial_port_data(port
);
409 if (count
> (KOBIL_BUF_LENGTH
- priv
->filled
)) {
410 dbg("%s - port %d Error: write request bigger than buffer size", __func__
, port
->number
);
414 /* Copy data to buffer */
415 memcpy(priv
->buf
+ priv
->filled
, buf
, count
);
416 usb_serial_debug_data(debug
, &port
->dev
, __func__
, count
,
417 priv
->buf
+ priv
->filled
);
418 priv
->filled
= priv
->filled
+ count
;
420 /* only send complete block. TWIN, KAAN SIM and adapter K
421 use the same protocol. */
422 if (((priv
->device_type
!= KOBIL_ADAPTER_B_PRODUCT_ID
) && (priv
->filled
> 2) && (priv
->filled
>= (priv
->buf
[1] + 3))) ||
423 ((priv
->device_type
== KOBIL_ADAPTER_B_PRODUCT_ID
) && (priv
->filled
> 3) && (priv
->filled
>= (priv
->buf
[2] + 4)))) {
424 /* stop reading (except TWIN and KAAN SIM) */
425 if ((priv
->device_type
== KOBIL_ADAPTER_B_PRODUCT_ID
)
426 || (priv
->device_type
== KOBIL_ADAPTER_K_PRODUCT_ID
))
427 usb_kill_urb(port
->interrupt_in_urb
);
429 todo
= priv
->filled
- priv
->cur_pos
;
432 /* max 8 byte in one urb (endpoint size) */
433 length
= (todo
< 8) ? todo
: 8;
434 /* copy data to transfer buffer */
435 memcpy(port
->write_urb
->transfer_buffer
,
436 priv
->buf
+ priv
->cur_pos
, length
);
437 usb_fill_int_urb(port
->write_urb
,
439 usb_sndintpipe(port
->serial
->dev
,
440 priv
->write_int_endpoint_address
),
441 port
->write_urb
->transfer_buffer
,
443 kobil_write_callback
,
448 priv
->cur_pos
= priv
->cur_pos
+ length
;
449 result
= usb_submit_urb(port
->write_urb
, GFP_NOIO
);
450 dbg("%s - port %d Send write URB returns: %i",
451 __func__
, port
->number
, result
);
452 todo
= priv
->filled
- priv
->cur_pos
;
461 /* start reading (except TWIN and KAAN SIM) */
462 if (priv
->device_type
== KOBIL_ADAPTER_B_PRODUCT_ID
||
463 priv
->device_type
== KOBIL_ADAPTER_K_PRODUCT_ID
) {
464 result
= usb_submit_urb(port
->interrupt_in_urb
,
466 dbg("%s - port %d Send read URB returns: %i",
467 __func__
, port
->number
, result
);
474 static int kobil_write_room(struct tty_struct
*tty
)
476 /* dbg("%s - port %d", __func__, port->number); */
482 static int kobil_tiocmget(struct tty_struct
*tty
)
484 struct usb_serial_port
*port
= tty
->driver_data
;
485 struct kobil_private
*priv
;
487 unsigned char *transfer_buffer
;
488 int transfer_buffer_length
= 8;
490 priv
= usb_get_serial_port_data(port
);
491 if (priv
->device_type
== KOBIL_USBTWIN_PRODUCT_ID
492 || priv
->device_type
== KOBIL_KAAN_SIM_PRODUCT_ID
) {
493 /* This device doesn't support ioctl calls */
497 /* allocate memory for transfer buffer */
498 transfer_buffer
= kzalloc(transfer_buffer_length
, GFP_KERNEL
);
499 if (!transfer_buffer
)
502 result
= usb_control_msg(port
->serial
->dev
,
503 usb_rcvctrlpipe(port
->serial
->dev
, 0),
504 SUSBCRequest_GetStatusLineState
,
505 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_IN
,
509 transfer_buffer_length
,
512 dbg("%s - port %d Send get_status_line_state URB returns: %i. Statusline: %02x",
513 __func__
, port
->number
, result
, transfer_buffer
[0]);
516 if ((transfer_buffer
[0] & SUSBCR_GSL_DSR
) != 0)
518 kfree(transfer_buffer
);
522 static int kobil_tiocmset(struct tty_struct
*tty
,
523 unsigned int set
, unsigned int clear
)
525 struct usb_serial_port
*port
= tty
->driver_data
;
526 struct kobil_private
*priv
;
530 unsigned char *transfer_buffer
;
531 int transfer_buffer_length
= 8;
533 /* FIXME: locking ? */
534 priv
= usb_get_serial_port_data(port
);
535 if (priv
->device_type
== KOBIL_USBTWIN_PRODUCT_ID
536 || priv
->device_type
== KOBIL_KAAN_SIM_PRODUCT_ID
) {
537 /* This device doesn't support ioctl calls */
541 /* allocate memory for transfer buffer */
542 transfer_buffer
= kzalloc(transfer_buffer_length
, GFP_KERNEL
);
543 if (!transfer_buffer
)
550 if (clear
& TIOCM_RTS
)
552 if (clear
& TIOCM_DTR
)
555 if (priv
->device_type
== KOBIL_ADAPTER_B_PRODUCT_ID
) {
557 dbg("%s - port %d Setting DTR",
558 __func__
, port
->number
);
560 dbg("%s - port %d Clearing DTR",
561 __func__
, port
->number
);
562 result
= usb_control_msg(port
->serial
->dev
,
563 usb_rcvctrlpipe(port
->serial
->dev
, 0),
564 SUSBCRequest_SetStatusLinesOrQueues
,
565 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_OUT
,
566 ((dtr
!= 0) ? SUSBCR_SSL_SETDTR
: SUSBCR_SSL_CLRDTR
),
573 dbg("%s - port %d Setting RTS",
574 __func__
, port
->number
);
576 dbg("%s - port %d Clearing RTS",
577 __func__
, port
->number
);
578 result
= usb_control_msg(port
->serial
->dev
,
579 usb_rcvctrlpipe(port
->serial
->dev
, 0),
580 SUSBCRequest_SetStatusLinesOrQueues
,
581 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_OUT
,
582 ((rts
!= 0) ? SUSBCR_SSL_SETRTS
: SUSBCR_SSL_CLRRTS
),
588 dbg("%s - port %d Send set_status_line URB returns: %i",
589 __func__
, port
->number
, result
);
590 kfree(transfer_buffer
);
591 return (result
< 0) ? result
: 0;
594 static void kobil_set_termios(struct tty_struct
*tty
,
595 struct usb_serial_port
*port
, struct ktermios
*old
)
597 struct kobil_private
*priv
;
599 unsigned short urb_val
= 0;
600 int c_cflag
= tty
->termios
->c_cflag
;
603 priv
= usb_get_serial_port_data(port
);
604 if (priv
->device_type
== KOBIL_USBTWIN_PRODUCT_ID
||
605 priv
->device_type
== KOBIL_KAAN_SIM_PRODUCT_ID
) {
606 /* This device doesn't support ioctl calls */
607 *tty
->termios
= *old
;
611 speed
= tty_get_baud_rate(tty
);
614 urb_val
= SUSBCR_SBR_1200
;
619 urb_val
= SUSBCR_SBR_9600
;
622 urb_val
|= (c_cflag
& CSTOPB
) ? SUSBCR_SPASB_2StopBits
:
623 SUSBCR_SPASB_1StopBit
;
624 if (c_cflag
& PARENB
) {
625 if (c_cflag
& PARODD
)
626 urb_val
|= SUSBCR_SPASB_OddParity
;
628 urb_val
|= SUSBCR_SPASB_EvenParity
;
630 urb_val
|= SUSBCR_SPASB_NoParity
;
631 tty
->termios
->c_cflag
&= ~CMSPAR
;
632 tty_encode_baud_rate(tty
, speed
, speed
);
634 result
= usb_control_msg(port
->serial
->dev
,
635 usb_rcvctrlpipe(port
->serial
->dev
, 0),
636 SUSBCRequest_SetBaudRateParityAndStopBits
,
637 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_OUT
,
646 static int kobil_ioctl(struct tty_struct
*tty
,
647 unsigned int cmd
, unsigned long arg
)
649 struct usb_serial_port
*port
= tty
->driver_data
;
650 struct kobil_private
*priv
= usb_get_serial_port_data(port
);
651 unsigned char *transfer_buffer
;
652 int transfer_buffer_length
= 8;
655 if (priv
->device_type
== KOBIL_USBTWIN_PRODUCT_ID
||
656 priv
->device_type
== KOBIL_KAAN_SIM_PRODUCT_ID
)
657 /* This device doesn't support ioctl calls */
662 transfer_buffer
= kmalloc(transfer_buffer_length
, GFP_KERNEL
);
663 if (!transfer_buffer
)
666 result
= usb_control_msg(port
->serial
->dev
,
667 usb_rcvctrlpipe(port
->serial
->dev
, 0),
669 USB_TYPE_VENDOR
| USB_RECIP_ENDPOINT
| USB_DIR_OUT
,
670 SUSBCR_MSC_ResetAllQueues
,
672 NULL
, /* transfer_buffer, */
677 dbg("%s - port %d Send reset_all_queues (FLUSH) URB returns: %i", __func__
, port
->number
, result
);
678 kfree(transfer_buffer
);
679 return (result
< 0) ? -EIO
: 0;
685 static int __init
kobil_init(void)
688 retval
= usb_serial_register(&kobil_device
);
690 goto failed_usb_serial_register
;
691 retval
= usb_register(&kobil_driver
);
693 goto failed_usb_register
;
695 printk(KERN_INFO KBUILD_MODNAME
": " DRIVER_VERSION
":"
700 usb_serial_deregister(&kobil_device
);
701 failed_usb_serial_register
:
706 static void __exit
kobil_exit(void)
708 usb_deregister(&kobil_driver
);
709 usb_serial_deregister(&kobil_device
);
712 module_init(kobil_init
);
713 module_exit(kobil_exit
);
715 MODULE_AUTHOR(DRIVER_AUTHOR
);
716 MODULE_DESCRIPTION(DRIVER_DESC
);
717 MODULE_LICENSE("GPL");
719 module_param(debug
, bool, S_IRUGO
| S_IWUSR
);
720 MODULE_PARM_DESC(debug
, "Debug enabled or not");