diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-07 08:27:46 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-07 08:27:46 -0800 |
| commit | 50f337bbe30418bea8cee744a43c4307b4e3188d (patch) | |
| tree | 3849e268acdc7f07bfa1804774e08f1aaaed1abe | |
| parent | c353745225300ab01da6609234ca310df5b5d0fe (diff) | |
| download | patches-50f337bbe30418bea8cee744a43c4307b4e3188d.tar.gz | |
driver.patch
| -rw-r--r-- | driver.patch | 118 | ||||
| -rw-r--r-- | series | 1 |
2 files changed, 119 insertions, 0 deletions
diff --git a/driver.patch b/driver.patch new file mode 100644 index 00000000000000..74789394cbac9d --- /dev/null +++ b/driver.patch @@ -0,0 +1,118 @@ +--- + drivers/usb/serial/Kconfig | 9 ++++ + drivers/usb/serial/Makefile | 1 + drivers/usb/serial/f81232.c | 81 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 91 insertions(+) + +--- a/drivers/usb/serial/Kconfig ++++ b/drivers/usb/serial/Kconfig +@@ -238,6 +238,15 @@ config USB_SERIAL_EDGEPORT_TI + To compile this driver as a module, choose M here: the + module will be called io_ti. + ++config USB_SERIAL_F81232 ++ tristate "USB Fintek F81232 Single Port Serial Driver" ++ help ++ Say Y here if you want to use the Fintek F81232 single ++ port usb to serial adapter. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called f81232. ++ + config USB_SERIAL_GARMIN + tristate "USB Garmin GPS driver" + help +--- a/drivers/usb/serial/Makefile ++++ b/drivers/usb/serial/Makefile +@@ -23,6 +23,7 @@ obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) + obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o + obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI) += io_ti.o + obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o ++obj-$(CONFIG_USB_SERIAL_F81232) += f81232.o + obj-$(CONFIG_USB_SERIAL_FTDI_SIO) += ftdi_sio.o + obj-$(CONFIG_USB_SERIAL_FUNSOFT) += funsoft.o + obj-$(CONFIG_USB_SERIAL_GARMIN) += garmin_gps.o +--- /dev/null ++++ b/drivers/usb/serial/f81232.c +@@ -0,0 +1,81 @@ ++/* ++ * Fintek F81232 USB to serial adaptor driver ++ * ++ * Copyright (C) 2012 Greg Kroah-Hartman (gregkh@linuxfoundation.org) ++ * Copyright (C) 2012 Linux Foundation ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published by ++ * the Free Software Foundation. ++ * ++ */ ++ ++ ++#include <linux/kernel.h> ++#include <linux/errno.h> ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/tty.h> ++#include <linux/tty_driver.h> ++#include <linux/tty_flip.h> ++#include <linux/serial.h> ++#include <linux/module.h> ++#include <linux/moduleparam.h> ++#include <linux/spinlock.h> ++#include <linux/uaccess.h> ++#include <linux/usb.h> ++#include <linux/usb/serial.h> ++ ++ ++static bool debug; ++ ++static const struct usb_device_id id_table[] = { ++ { USB_DEVICE(0x1934, 0x0706) }, ++ { } /* Terminating entry */ ++}; ++MODULE_DEVICE_TABLE(usb, id_table); ++ ++static struct usb_driver f81232_driver = { ++ .name = "f81232", ++ .probe = usb_serial_probe, ++ .disconnect = usb_serial_disconnect, ++ .id_table = id_table, ++ .suspend = usb_serial_suspend, ++ .resume = usb_serial_resume, ++ .no_dynamic_id = 1, ++ .supports_autosuspend = 1, ++}; ++ ++ ++static int __init f81232_init(void) ++{ ++ int retval; ++ ++ retval = usb_serial_register(&f81232_device); ++ if (retval) ++ goto failed_usb_serial_register; ++ retval = usb_register(&f81232_driver); ++ if (retval) ++ goto failed_usb_register; ++ return 0; ++failed_usb_register: ++ usb_serial_deregister(&f81232_device); ++failed_usb_serial_register: ++ return retval; ++} ++ ++static void __exit f81232_exit(void) ++{ ++ usb_deregister(&f81232_driver); ++ usb_serial_deregister(&f81232_device); ++} ++ ++module_init(f81232_init); ++module_exit(f81232_exit); ++ ++MODULE_DESCRIPTION(DRIVER_DESC); ++MODULE_LICENSE("GPL"); ++ ++module_param(debug, bool, S_IRUGO | S_IWUSR); ++MODULE_PARM_DESC(debug, "Debug enabled or not"); ++ @@ -1,4 +1,5 @@ # My specific stuff, at the top to make it easier to work stuff below. +driver.patch mce2.patch gregkh/gkh-version.patch |
