| Greg Kroah-Hartman | 6986a97 | 2008-05-02 12:02:20 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * Motorola USB Phone driver | 
 | 3 |  * | 
 | 4 |  * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com> | 
 | 5 |  * | 
 | 6 |  *  This program is free software; you can redistribute it and/or modify | 
 | 7 |  *  it under the terms of the GNU General Public License version 2 as | 
 | 8 |  *  published by the Free Software Foundation. | 
 | 9 |  * | 
 | 10 |  * {sigh} | 
| Maxin John | 981e60f | 2009-07-20 15:16:42 +0530 | [diff] [blame] | 11 |  * Motorola should be using the CDC ACM USB spec, but instead | 
| Greg Kroah-Hartman | 6986a97 | 2008-05-02 12:02:20 -0700 | [diff] [blame] | 12 |  * they try to just "do their own thing"...  This driver should handle a | 
 | 13 |  * few phones in which a basic "dumb serial connection" is needed to be | 
 | 14 |  * able to get a connection through to them. | 
 | 15 |  */ | 
 | 16 |  | 
 | 17 | #include <linux/kernel.h> | 
 | 18 | #include <linux/init.h> | 
 | 19 | #include <linux/tty.h> | 
 | 20 | #include <linux/module.h> | 
 | 21 | #include <linux/usb.h> | 
 | 22 | #include <linux/usb/serial.h> | 
 | 23 |  | 
| Németh Márton | 7d40d7e | 2010-01-10 15:34:24 +0100 | [diff] [blame] | 24 | static const struct usb_device_id id_table[] = { | 
| Greg Kroah-Hartman | 6986a97 | 2008-05-02 12:02:20 -0700 | [diff] [blame] | 25 | 	{ USB_DEVICE(0x05c6, 0x3197) },	/* unknown Motorola phone */ | 
 | 26 | 	{ USB_DEVICE(0x0c44, 0x0022) },	/* unknown Mororola phone */ | 
 | 27 | 	{ USB_DEVICE(0x22b8, 0x2a64) },	/* Motorola KRZR K1m */ | 
| Elizabeth Jennifer Myers | 3938a0b | 2011-04-16 14:49:51 -0400 | [diff] [blame] | 28 | 	{ USB_DEVICE(0x22b8, 0x2c84) }, /* Motorola VE240 phone */ | 
| Dr. Greg Wettstein | d45e230 | 2009-04-11 09:12:08 -0500 | [diff] [blame] | 29 | 	{ USB_DEVICE(0x22b8, 0x2c64) }, /* Motorola V950 phone */ | 
| Greg Kroah-Hartman | 6986a97 | 2008-05-02 12:02:20 -0700 | [diff] [blame] | 30 | 	{ }, | 
 | 31 | }; | 
 | 32 | MODULE_DEVICE_TABLE(usb, id_table); | 
 | 33 |  | 
 | 34 | static struct usb_driver moto_driver = { | 
 | 35 | 	.name =		"moto-modem", | 
 | 36 | 	.probe =	usb_serial_probe, | 
 | 37 | 	.disconnect =	usb_serial_disconnect, | 
 | 38 | 	.id_table =	id_table, | 
| Greg Kroah-Hartman | 6986a97 | 2008-05-02 12:02:20 -0700 | [diff] [blame] | 39 | }; | 
 | 40 |  | 
 | 41 | static struct usb_serial_driver moto_device = { | 
 | 42 | 	.driver = { | 
 | 43 | 		.owner =	THIS_MODULE, | 
 | 44 | 		.name =		"moto-modem", | 
 | 45 | 	}, | 
 | 46 | 	.id_table =		id_table, | 
| Greg Kroah-Hartman | 6986a97 | 2008-05-02 12:02:20 -0700 | [diff] [blame] | 47 | 	.num_ports =		1, | 
 | 48 | }; | 
 | 49 |  | 
| Alan Stern | 4d2a7af | 2012-02-23 14:57:09 -0500 | [diff] [blame] | 50 | static struct usb_serial_driver * const serial_drivers[] = { | 
 | 51 | 	&moto_device, NULL | 
 | 52 | }; | 
 | 53 |  | 
| Greg Kroah-Hartman | 54cbcf5 | 2012-02-28 13:12:12 -0800 | [diff] [blame] | 54 | module_usb_serial_driver(moto_driver, serial_drivers); | 
| Greg Kroah-Hartman | 6986a97 | 2008-05-02 12:02:20 -0700 | [diff] [blame] | 55 | MODULE_LICENSE("GPL"); |