1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/tty.h>
19#include <linux/module.h>
20#include <linux/usb.h>
21#include <linux/usb/serial.h>
22
23#define DRIVER_DESC "HP4x (48/49) Generic Serial driver"
24
25#define HP_VENDOR_ID 0x03f0
26#define HP49GP_PRODUCT_ID 0x0121
27
28static const struct usb_device_id id_table[] = {
29 { USB_DEVICE(HP_VENDOR_ID, HP49GP_PRODUCT_ID) },
30 { }
31};
32
33MODULE_DEVICE_TABLE(usb, id_table);
34
35static struct usb_serial_driver hp49gp_device = {
36 .driver = {
37 .owner = THIS_MODULE,
38 .name = "hp4X",
39 },
40 .id_table = id_table,
41 .num_ports = 1,
42};
43
44static struct usb_serial_driver * const serial_drivers[] = {
45 &hp49gp_device, NULL
46};
47
48module_usb_serial_driver(serial_drivers, id_table);
49
50MODULE_DESCRIPTION(DRIVER_DESC);
51MODULE_LICENSE("GPL");
52