drivers/usb/serial/ipaq.c

Source file repositories/reference/linux-study-clean/drivers/usb/serial/ipaq.c

File Facts

System
Linux kernel
Corpus path
drivers/usb/serial/ipaq.c
Extension
.c
Size
32057 bytes
Lines
608
Domain
Driver Families
Bucket
drivers/usb
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0+
/*
 * USB Compaq iPAQ driver
 *
 *	Copyright (C) 2001 - 2002
 *	    Ganesh Varadarajan <ganesh@veritas.com>
 */

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>

#define KP_RETRIES	100

#define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>"
#define DRIVER_DESC "USB PocketPC PDA driver"

static int connect_retries = KP_RETRIES;
static int initial_wait;

/* Function prototypes for an ipaq */
static int  ipaq_open(struct tty_struct *tty,
			struct usb_serial_port *port);
static int ipaq_calc_num_ports(struct usb_serial *serial,
					struct usb_serial_endpoints *epds);
static int  ipaq_startup(struct usb_serial *serial);

static const struct usb_device_id ipaq_id_table[] = {
	{ USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */
	{ USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */
	{ USB_DEVICE(0x03F0, 0x1116) }, /* HP USB Sync 1611 */
	{ USB_DEVICE(0x03F0, 0x1216) }, /* HP USB Sync 1612 */
	{ USB_DEVICE(0x03F0, 0x2016) }, /* HP USB Sync 1620 */
	{ USB_DEVICE(0x03F0, 0x2116) }, /* HP USB Sync 1621 */
	{ USB_DEVICE(0x03F0, 0x2216) }, /* HP USB Sync 1622 */
	{ USB_DEVICE(0x03F0, 0x3016) }, /* HP USB Sync 1630 */
	{ USB_DEVICE(0x03F0, 0x3116) }, /* HP USB Sync 1631 */
	{ USB_DEVICE(0x03F0, 0x3216) }, /* HP USB Sync 1632 */
	{ USB_DEVICE(0x03F0, 0x4016) }, /* HP USB Sync 1640 */
	{ USB_DEVICE(0x03F0, 0x4116) }, /* HP USB Sync 1641 */
	{ USB_DEVICE(0x03F0, 0x4216) }, /* HP USB Sync 1642 */
	{ USB_DEVICE(0x03F0, 0x5016) }, /* HP USB Sync 1650 */
	{ USB_DEVICE(0x03F0, 0x5116) }, /* HP USB Sync 1651 */
	{ USB_DEVICE(0x03F0, 0x5216) }, /* HP USB Sync 1652 */
	{ USB_DEVICE(0x0409, 0x00D5) }, /* NEC USB Sync */
	{ USB_DEVICE(0x0409, 0x00D6) }, /* NEC USB Sync */
	{ USB_DEVICE(0x0409, 0x00D7) }, /* NEC USB Sync */
	{ USB_DEVICE(0x0409, 0x8024) }, /* NEC USB Sync */
	{ USB_DEVICE(0x0409, 0x8025) }, /* NEC USB Sync */
	{ USB_DEVICE(0x043E, 0x9C01) }, /* LGE USB Sync */
	{ USB_DEVICE(0x045E, 0x00CE) }, /* Microsoft USB Sync */
	{ USB_DEVICE(0x045E, 0x0400) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0401) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0402) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0403) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0404) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0405) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0406) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0407) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0408) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0409) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x040A) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x040B) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x040C) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x040D) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x040E) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x040F) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0410) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0411) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0412) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0413) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0414) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0415) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0416) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0417) }, /* Windows Powered Pocket PC 2002 */
	{ USB_DEVICE(0x045E, 0x0432) }, /* Windows Powered Pocket PC 2003 */
	{ USB_DEVICE(0x045E, 0x0433) }, /* Windows Powered Pocket PC 2003 */
	{ USB_DEVICE(0x045E, 0x0434) }, /* Windows Powered Pocket PC 2003 */
	{ USB_DEVICE(0x045E, 0x0435) }, /* Windows Powered Pocket PC 2003 */
	{ USB_DEVICE(0x045E, 0x0436) }, /* Windows Powered Pocket PC 2003 */
	{ USB_DEVICE(0x045E, 0x0437) }, /* Windows Powered Pocket PC 2003 */
	{ USB_DEVICE(0x045E, 0x0438) }, /* Windows Powered Pocket PC 2003 */

Annotation

Implementation Notes