Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 1 | /* |
| 2 | * HP4x Calculators Serial USB driver |
| 3 | * |
| 4 | * Copyright (C) 2005 Arthur Huillet (ahuillet@users.sf.net) |
Greg KH | 35ecc48 | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 5 | * Copyright (C) 2001-2005 Greg Kroah-Hartman (greg@kroah.com) |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
Alan Cox | 3a262b2 | 2008-07-22 11:12:05 +0100 | [diff] [blame] | 12 | * See Documentation/usb/usb-serial.txt for more information on using this |
| 13 | * driver |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 14 | */ |
| 15 | |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 16 | #include <linux/kernel.h> |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 17 | #include <linux/init.h> |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 18 | #include <linux/tty.h> |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 19 | #include <linux/module.h> |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 20 | #include <linux/usb.h> |
Greg Kroah-Hartman | a969888 | 2006-07-11 21:22:58 -0700 | [diff] [blame] | 21 | #include <linux/usb/serial.h> |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 22 | |
| 23 | /* |
| 24 | * Version Information |
| 25 | */ |
| 26 | #define DRIVER_VERSION "v1.00" |
| 27 | #define DRIVER_DESC "HP4x (48/49) Generic Serial driver" |
| 28 | |
| 29 | #define HP_VENDOR_ID 0x03f0 |
| 30 | #define HP49GP_PRODUCT_ID 0x0121 |
| 31 | |
Németh Márton | 7d40d7e | 2010-01-10 15:34:24 +0100 | [diff] [blame] | 32 | static const struct usb_device_id id_table[] = { |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 33 | { USB_DEVICE(HP_VENDOR_ID, HP49GP_PRODUCT_ID) }, |
| 34 | { } /* Terminating entry */ |
| 35 | }; |
| 36 | |
| 37 | MODULE_DEVICE_TABLE(usb, id_table); |
| 38 | |
| 39 | static struct usb_driver hp49gp_driver = { |
Greg Kroah-Hartman | 269bda1 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 40 | .name = "hp4X", |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 41 | .probe = usb_serial_probe, |
| 42 | .disconnect = usb_serial_disconnect, |
| 43 | .id_table = id_table, |
| 44 | }; |
| 45 | |
Greg Kroah-Hartman | ea65370 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 46 | static struct usb_serial_driver hp49gp_device = { |
Greg Kroah-Hartman | 18fcac3 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 47 | .driver = { |
| 48 | .owner = THIS_MODULE, |
Greg Kroah-Hartman | 269bda1 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 49 | .name = "hp4X", |
Greg Kroah-Hartman | 18fcac3 | 2005-06-20 21:15:16 -0700 | [diff] [blame] | 50 | }, |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 51 | .id_table = id_table, |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 52 | .num_ports = 1, |
| 53 | }; |
| 54 | |
Alan Stern | 97b6b6d | 2012-02-23 14:56:32 -0500 | [diff] [blame] | 55 | static struct usb_serial_driver * const serial_drivers[] = { |
| 56 | &hp49gp_device, NULL |
| 57 | }; |
| 58 | |
Greg Kroah-Hartman | 68e9c9a | 2012-02-28 13:11:49 -0800 | [diff] [blame] | 59 | module_usb_serial_driver(hp49gp_driver, serial_drivers); |
Arthur Huillet | 36045fb | 2005-04-22 15:06:59 -0700 | [diff] [blame] | 60 | |
| 61 | MODULE_DESCRIPTION(DRIVER_DESC); |
| 62 | MODULE_VERSION(DRIVER_VERSION); |
| 63 | MODULE_LICENSE("GPL"); |