linux/drivers/media/usb/b2c2/flexcop-usb.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Linux driver for digital TV devices equipped with B2C2 FlexcopII(b)/III
 * flexcop-usb.c - covers the USB part
 * see flexcop.c for copyright information
 */
#define FC_LOG_PREFIX
#include "flexcop-usb.h"
#include "flexcop-common.h"

/* Version information */
#define DRIVER_VERSION
#define DRIVER_NAME
#define DRIVER_AUTHOR

/* debug */
#ifdef CONFIG_DVB_B2C2_FLEXCOP_DEBUG
#define dprintk(level, args...)

#define debug_dump(b, l, method)

#define DEBSTATUS
#else
#define dprintk
#define debug_dump
#define DEBSTATUS
#endif

static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC();
#undef DEBSTATUS

#define deb_info(args...)
#define deb_ts(args...)
#define deb_ctrl(args...)
#define deb_i2c(args...)
#define deb_v8(args...)

/* JLP 111700: we will include the 1 bit gap between the upper and lower 3 bits
 * in the IBI address, to make the V8 code simpler.
 * PCI ADDRESS FORMAT: 0x71C -> 0000 0111 0001 1100 (the six bits used)
 *                  in general: 0000 0HHH 000L LL00
 * IBI ADDRESS FORMAT:                    RHHH BLLL
 *
 * where R is the read(1)/write(0) bit, B is the busy bit
 * and HHH and LLL are the two sets of three bits from the PCI address.
 */
#define B2C2_FLEX_PCIOFFSET_TO_INTERNALADDR(usPCI)
#define B2C2_FLEX_INTERNALADDR_TO_PCIOFFSET(ucAddr)

/*
 * DKT 020228
 * - forget about this VENDOR_BUFFER_SIZE, read and write register
 *   deal with DWORD or 4 bytes, that should be should from now on
 * - from now on, we don't support anything older than firm 1.00
 *   I eliminated the write register as a 2 trip of writing hi word and lo word
 *   and force this to write only 4 bytes at a time.
 *   NOTE: this should work with all the firmware from 1.00 and newer
 */
static int flexcop_usb_readwrite_dw(struct flexcop_device *fc, u16 wRegOffsPCI, u32 *val, u8 read)
{}
/*
 * DKT 010817 - add support for V8 memory read/write and flash update
 */
static int flexcop_usb_v8_memory_req(struct flexcop_usb *fc_usb,
		flexcop_usb_request_t req, u8 page, u16 wAddress,
		u8 *pbBuffer, u32 buflen)
{}

#define bytes_left_to_read_on_page(paddr, buflen)

static int flexcop_usb_memory_req(struct flexcop_usb *fc_usb,
		flexcop_usb_request_t req, flexcop_usb_mem_page_t page_start,
		u32 addr, int extended, u8 *buf, u32 len)
{}

static int flexcop_usb_get_mac_addr(struct flexcop_device *fc, int extended)
{}

/* usb i2c stuff */
static int flexcop_usb_i2c_req(struct flexcop_i2c_adapter *i2c,
		flexcop_usb_request_t req, flexcop_usb_i2c_function_t func,
		u8 chipaddr, u8 addr, u8 *buf, u8 buflen)
{}

/* actual bus specific access functions,
   make sure prototype are/will be equal to pci */
static flexcop_ibi_value flexcop_usb_read_ibi_reg(struct flexcop_device *fc,
	flexcop_ibi_register reg)
{}

static int flexcop_usb_write_ibi_reg(struct flexcop_device *fc,
		flexcop_ibi_register reg, flexcop_ibi_value val)
{}

static int flexcop_usb_i2c_request(struct flexcop_i2c_adapter *i2c,
		flexcop_access_op_t op, u8 chipaddr, u8 addr, u8 *buf, u16 len)
{}

static void flexcop_usb_process_frame(struct flexcop_usb *fc_usb,
	u8 *buffer, int buffer_length)
{}

static void flexcop_usb_urb_complete(struct urb *urb)
{}

static int flexcop_usb_stream_control(struct flexcop_device *fc, int onoff)
{}

static void flexcop_usb_transfer_exit(struct flexcop_usb *fc_usb)
{}

static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)
{}

static int flexcop_usb_init(struct flexcop_usb *fc_usb)
{}

static void flexcop_usb_exit(struct flexcop_usb *fc_usb)
{}

static int flexcop_usb_probe(struct usb_interface *intf,
		const struct usb_device_id *id)
{}

static void flexcop_usb_disconnect(struct usb_interface *intf)
{}

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

/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver flexcop_usb_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();