linux/drivers/usb/serial/spcp8x5.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * spcp8x5 USB to serial adaptor driver
 *
 * Copyright (C) 2010-2013 Johan Hovold ([email protected])
 * Copyright (C) 2006 Linxb ([email protected])
 * Copyright (C) 2006 S1 Corp.
 *
 * Original driver for 2.6.10 pl2303 driver by
 *   Greg Kroah-Hartman ([email protected])
 * Changes for 2.6.20 by Harald Klein <[email protected]>
 */
#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/usb.h>
#include <linux/usb/serial.h>

#define DRIVER_DESC

#define SPCP825_QUIRK_NO_UART_STATUS
#define SPCP825_QUIRK_NO_WORK_MODE

#define SPCP8x5_007_VID
#define SPCP8x5_007_PID
#define SPCP8x5_008_VID
#define SPCP8x5_008_PID
#define SPCP8x5_PHILIPS_VID
#define SPCP8x5_PHILIPS_PID
#define SPCP8x5_INTERMATIC_VID
#define SPCP8x5_INTERMATIC_PID
#define SPCP8x5_835_VID
#define SPCP8x5_835_PID

static const struct usb_device_id id_table[] =;
MODULE_DEVICE_TABLE(usb, id_table);

struct spcp8x5_usb_ctrl_arg {};


/* spcp8x5 spec register define */
#define MCR_CONTROL_LINE_RTS
#define MCR_CONTROL_LINE_DTR
#define MCR_DTR
#define MCR_RTS

#define MSR_STATUS_LINE_DCD
#define MSR_STATUS_LINE_RI
#define MSR_STATUS_LINE_DSR
#define MSR_STATUS_LINE_CTS

/* verdor command here , we should define myself */
#define SET_DEFAULT
#define SET_DEFAULT_TYPE

#define SET_UART_FORMAT
#define SET_UART_FORMAT_TYPE
#define SET_UART_FORMAT_SIZE_5
#define SET_UART_FORMAT_SIZE_6
#define SET_UART_FORMAT_SIZE_7
#define SET_UART_FORMAT_SIZE_8
#define SET_UART_FORMAT_STOP_1
#define SET_UART_FORMAT_STOP_2
#define SET_UART_FORMAT_PAR_NONE
#define SET_UART_FORMAT_PAR_ODD
#define SET_UART_FORMAT_PAR_EVEN
#define SET_UART_FORMAT_PAR_MASK
#define SET_UART_FORMAT_PAR_SPACE

#define GET_UART_STATUS_TYPE
#define GET_UART_STATUS
#define GET_UART_STATUS_MSR

#define SET_UART_STATUS
#define SET_UART_STATUS_TYPE
#define SET_UART_STATUS_MCR
#define SET_UART_STATUS_MCR_DTR
#define SET_UART_STATUS_MCR_RTS
#define SET_UART_STATUS_MCR_LOOP

#define SET_WORKING_MODE
#define SET_WORKING_MODE_TYPE
#define SET_WORKING_MODE_U2C
#define SET_WORKING_MODE_RS485
#define SET_WORKING_MODE_PDMA
#define SET_WORKING_MODE_SPP

#define SET_FLOWCTL_CHAR
#define SET_FLOWCTL_CHAR_TYPE

#define GET_VERSION
#define GET_VERSION_TYPE

#define SET_REGISTER
#define SET_REGISTER_TYPE

#define GET_REGISTER
#define GET_REGISTER_TYPE

#define SET_RAM
#define SET_RAM_TYPE

#define GET_RAM
#define GET_RAM_TYPE

/* how come ??? */
#define UART_STATE
#define UART_STATE_TRANSIENT_MASK
#define UART_DCD
#define UART_DSR
#define UART_BREAK_ERROR
#define UART_RING
#define UART_FRAME_ERROR
#define UART_PARITY_ERROR
#define UART_OVERRUN_ERROR
#define UART_CTS

struct spcp8x5_private {};

static int spcp8x5_probe(struct usb_serial *serial,
						const struct usb_device_id *id)
{}

static int spcp8x5_port_probe(struct usb_serial_port *port)
{}

static void spcp8x5_port_remove(struct usb_serial_port *port)
{}

static int spcp8x5_set_ctrl_line(struct usb_serial_port *port, u8 mcr)
{}

static int spcp8x5_get_msr(struct usb_serial_port *port, u8 *status)
{}

static void spcp8x5_set_work_mode(struct usb_serial_port *port, u16 value,
								 u16 index)
{}

static int spcp8x5_carrier_raised(struct usb_serial_port *port)
{}

static void spcp8x5_dtr_rts(struct usb_serial_port *port, int on)
{}

static void spcp8x5_init_termios(struct tty_struct *tty)
{}

static void spcp8x5_set_termios(struct tty_struct *tty,
				struct usb_serial_port *port,
				const struct ktermios *old_termios)
{}

static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port)
{}

static int spcp8x5_tiocmset(struct tty_struct *tty,
			    unsigned int set, unsigned int clear)
{}

static int spcp8x5_tiocmget(struct tty_struct *tty)
{}

static struct usb_serial_driver spcp8x5_device =;

static struct usb_serial_driver * const serial_drivers[] =;

module_usb_serial_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();