linux/drivers/isdn/hardware/mISDN/hfcsusb.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * hfcsusb.h, HFC-S USB mISDN driver
 */

#ifndef __HFCSUSB_H__
#define __HFCSUSB_H__


#define DRIVER_NAME

#define DBG_HFC_CALL_TRACE
#define DBG_HFC_FIFO_VERBOSE
#define DBG_HFC_USB_VERBOSE
#define DBG_HFC_URB_INFO
#define DBG_HFC_URB_ERROR

#define DEFAULT_TRANSP_BURST_SZ

#define HFC_CTRL_TIMEOUT
#define CLKDEL_TE
#define CLKDEL_NT

/* hfcsusb Layer1 commands */
#define HFC_L1_ACTIVATE_TE
#define HFC_L1_ACTIVATE_NT
#define HFC_L1_DEACTIVATE_NT
#define HFC_L1_FORCE_DEACTIVATE_TE

/* cmd FLAGS in HFCUSB_STATES register */
#define HFCUSB_LOAD_STATE
#define HFCUSB_ACTIVATE
#define HFCUSB_DO_ACTION
#define HFCUSB_NT_G2_G3

/* timers */
#define NT_ACTIVATION_TIMER
#define NT_T1_COUNT

#define MAX_BCH_SIZE

#define HFCUSB_RX_THRESHOLD
#define HFCUSB_TX_THRESHOLD

#define HFCUSB_CHIP_ID
#define HFCUSB_CIRM
#define HFCUSB_USB_SIZE
#define HFCUSB_USB_SIZE_I
#define HFCUSB_F_CROSS
#define HFCUSB_CLKDEL
#define HFCUSB_CON_HDLC
#define HFCUSB_HDLC_PAR
#define HFCUSB_SCTRL
#define HFCUSB_SCTRL_E
#define HFCUSB_SCTRL_R
#define HFCUSB_F_THRES
#define HFCUSB_FIFO
#define HFCUSB_F_USAGE
#define HFCUSB_MST_MODE0
#define HFCUSB_MST_MODE1
#define HFCUSB_P_DATA
#define HFCUSB_INC_RES_F
#define HFCUSB_B1_SSL
#define HFCUSB_B2_SSL
#define HFCUSB_B1_RSL
#define HFCUSB_B2_RSL
#define HFCUSB_STATES


#define HFCUSB_CHIPID

/* fifo registers */
#define HFCUSB_NUM_FIFOS
#define HFCUSB_B1_TX
#define HFCUSB_B1_RX
#define HFCUSB_B2_TX
#define HFCUSB_B2_RX
#define HFCUSB_D_TX
#define HFCUSB_D_RX
#define HFCUSB_PCM_TX
#define HFCUSB_PCM_RX


#define USB_INT
#define USB_BULK
#define USB_ISOC

#define ISOC_PACKETS_D
#define ISOC_PACKETS_B
#define ISO_BUFFER_SIZE

/* defines how much ISO packets are handled in one URB */
static int iso_packets[8] =;


/* Fifo flow Control for TX ISO */
#define SINK_MAX
#define SINK_MIN
#define SINK_DMIN
#define SINK_DMAX
#define BITLINE_INF

/* HFC-S USB register access by Control-URSs */
#define write_reg_atomic(a, b, c)
#define read_reg_atomic(a, b, c)
#define HFC_CTRL_BUFSIZE

struct ctrl_buf {};

/*
 * URB error codes
 * Used to represent a list of values and their respective symbolic names
 */
struct hfcusb_symbolic_list {};

static struct hfcusb_symbolic_list urb_errlist[] =;

static inline const char *
symbolic(struct hfcusb_symbolic_list list[], const int num)
{}

/* USB descriptor need to contain one of the following EndPoint combination: */
#define CNF_4INT3ISO
#define CNF_3INT3ISO
#define CNF_4ISO3ISO
#define CNF_3ISO3ISO

#define EP_NUL
#define EP_NOP
#define EP_ISO
#define EP_BLK
#define EP_INT

#define HFC_CHAN_B1
#define HFC_CHAN_B2
#define HFC_CHAN_D
#define HFC_CHAN_E


/*
 * List of all supported endpoint configuration sets, used to find the
 * best matching endpoint configuration within a device's USB descriptor.
 * We need at least 3 RX endpoints, and 3 TX endpoints, either
 * INT-in and ISO-out, or ISO-in and ISO-out)
 * with 4 RX endpoints even E-Channel logging is possible
 */
static int
validconf[][19] =;

/* string description of chosen config */
static char *conf_str[] =;


#define LED_OFF
#define LED_SCHEME1
#define LED_SCHEME2

#define LED_POWER_ON
#define LED_POWER_OFF
#define LED_S0_ON
#define LED_S0_OFF
#define LED_B1_ON
#define LED_B1_OFF
#define LED_B1_DATA
#define LED_B2_ON
#define LED_B2_OFF
#define LED_B2_DATA

#define LED_NORMAL
#define LED_INVERTED

/* time in ms to perform a Flashing LED when B-Channel has traffic */
#define LED_TIME



struct hfcsusb;
struct usb_fifo;

/* structure defining input+output fifos (interrupt/bulk mode) */
struct iso_urb {};

struct usb_fifo {};

struct hfcsusb {};

/* private vendor specific data */
struct hfcsusb_vdata {};


#define HFC_MAX_TE_LAYER1_STATE
#define HFC_MAX_NT_LAYER1_STATE

static const char *HFC_TE_LAYER1_STATES[HFC_MAX_TE_LAYER1_STATE + 1] =;

static const char *HFC_NT_LAYER1_STATES[HFC_MAX_NT_LAYER1_STATE + 1] =;

/* supported devices */
static const struct usb_device_id hfcsusb_idtab[] =;

MODULE_DEVICE_TABLE(usb, hfcsusb_idtab);

#endif	/* __HFCSUSB_H__ */