summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/drivers/usb/serial/usb_debug.c
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/drivers/usb/serial/usb_debug.c
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/drivers/usb/serial/usb_debug.c')
-rw-r--r--ANDROID_3.4.5/drivers/usb/serial/usb_debug.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/ANDROID_3.4.5/drivers/usb/serial/usb_debug.c b/ANDROID_3.4.5/drivers/usb/serial/usb_debug.c
deleted file mode 100644
index e3e8995a..00000000
--- a/ANDROID_3.4.5/drivers/usb/serial/usb_debug.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * USB Debug cable driver
- *
- * Copyright (C) 2006 Greg Kroah-Hartman <greg@kroah.com>
- *
- * 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/gfp.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/tty.h>
-#include <linux/module.h>
-#include <linux/usb.h>
-#include <linux/usb/serial.h>
-
-#define USB_DEBUG_MAX_PACKET_SIZE 8
-#define USB_DEBUG_BRK_SIZE 8
-static char USB_DEBUG_BRK[USB_DEBUG_BRK_SIZE] = {
- 0x00,
- 0xff,
- 0x01,
- 0xfe,
- 0x00,
- 0xfe,
- 0x01,
- 0xff,
-};
-
-static const struct usb_device_id id_table[] = {
- { USB_DEVICE(0x0525, 0x127a) },
- { },
-};
-MODULE_DEVICE_TABLE(usb, id_table);
-
-static struct usb_driver debug_driver = {
- .name = "debug",
- .probe = usb_serial_probe,
- .disconnect = usb_serial_disconnect,
- .id_table = id_table,
-};
-
-/* This HW really does not support a serial break, so one will be
- * emulated when ever the break state is set to true.
- */
-static void usb_debug_break_ctl(struct tty_struct *tty, int break_state)
-{
- struct usb_serial_port *port = tty->driver_data;
- if (!break_state)
- return;
- usb_serial_generic_write(tty, port, USB_DEBUG_BRK, USB_DEBUG_BRK_SIZE);
-}
-
-static void usb_debug_process_read_urb(struct urb *urb)
-{
- struct usb_serial_port *port = urb->context;
-
- if (urb->actual_length == USB_DEBUG_BRK_SIZE &&
- memcmp(urb->transfer_buffer, USB_DEBUG_BRK,
- USB_DEBUG_BRK_SIZE) == 0) {
- usb_serial_handle_break(port);
- return;
- }
-
- usb_serial_generic_process_read_urb(urb);
-}
-
-static struct usb_serial_driver debug_device = {
- .driver = {
- .owner = THIS_MODULE,
- .name = "debug",
- },
- .id_table = id_table,
- .num_ports = 1,
- .bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE,
- .break_ctl = usb_debug_break_ctl,
- .process_read_urb = usb_debug_process_read_urb,
-};
-
-static struct usb_serial_driver * const serial_drivers[] = {
- &debug_device, NULL
-};
-
-module_usb_serial_driver(debug_driver, serial_drivers);
-MODULE_LICENSE("GPL");