blob: 2563e788c9b3b3a750414604e37d927423e8175a [file] [log] [blame]
Arthur Huillet36045fb2005-04-22 15:06:59 -07001/*
2 * HP4x Calculators Serial USB driver
3 *
4 * Copyright (C) 2005 Arthur Huillet (ahuillet@users.sf.net)
Greg KH35ecc482005-04-22 15:06:59 -07005 * Copyright (C) 2001-2005 Greg Kroah-Hartman (greg@kroah.com)
Arthur Huillet36045fb2005-04-22 15:06:59 -07006 *
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 Cox3a262b22008-07-22 11:12:05 +010012 * See Documentation/usb/usb-serial.txt for more information on using this
13 * driver
Arthur Huillet36045fb2005-04-22 15:06:59 -070014 */
15
Arthur Huillet36045fb2005-04-22 15:06:59 -070016#include <linux/kernel.h>
Arthur Huillet36045fb2005-04-22 15:06:59 -070017#include <linux/init.h>
Arthur Huillet36045fb2005-04-22 15:06:59 -070018#include <linux/tty.h>
Arthur Huillet36045fb2005-04-22 15:06:59 -070019#include <linux/module.h>
Arthur Huillet36045fb2005-04-22 15:06:59 -070020#include <linux/usb.h>
Greg Kroah-Hartmana9698882006-07-11 21:22:58 -070021#include <linux/usb/serial.h>
Arthur Huillet36045fb2005-04-22 15:06:59 -070022
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árton7d40d7e2010-01-10 15:34:24 +010032static const struct usb_device_id id_table[] = {
Arthur Huillet36045fb2005-04-22 15:06:59 -070033 { USB_DEVICE(HP_VENDOR_ID, HP49GP_PRODUCT_ID) },
34 { } /* Terminating entry */
35};
36
37MODULE_DEVICE_TABLE(usb, id_table);
38
39static struct usb_driver hp49gp_driver = {
Greg Kroah-Hartman269bda12005-06-20 21:15:16 -070040 .name = "hp4X",
Arthur Huillet36045fb2005-04-22 15:06:59 -070041 .probe = usb_serial_probe,
42 .disconnect = usb_serial_disconnect,
43 .id_table = id_table,
44};
45
Greg Kroah-Hartmanea653702005-06-20 21:15:16 -070046static struct usb_serial_driver hp49gp_device = {
Greg Kroah-Hartman18fcac32005-06-20 21:15:16 -070047 .driver = {
48 .owner = THIS_MODULE,
Greg Kroah-Hartman269bda12005-06-20 21:15:16 -070049 .name = "hp4X",
Greg Kroah-Hartman18fcac32005-06-20 21:15:16 -070050 },
Arthur Huillet36045fb2005-04-22 15:06:59 -070051 .id_table = id_table,
Arthur Huillet36045fb2005-04-22 15:06:59 -070052 .num_ports = 1,
53};
54
Alan Stern97b6b6d2012-02-23 14:56:32 -050055static struct usb_serial_driver * const serial_drivers[] = {
56 &hp49gp_device, NULL
57};
58
Greg Kroah-Hartman68e9c9a2012-02-28 13:11:49 -080059module_usb_serial_driver(hp49gp_driver, serial_drivers);
Arthur Huillet36045fb2005-04-22 15:06:59 -070060
61MODULE_DESCRIPTION(DRIVER_DESC);
62MODULE_VERSION(DRIVER_VERSION);
63MODULE_LICENSE("GPL");