linux/drivers/media/usb/dvb-usb-v2/lmedm04.c

// SPDX-License-Identifier: GPL-2.0-only
/* DVB USB compliant linux driver for
 *
 * DM04/QQBOX DVB-S USB BOX	LME2510C + SHARP:BS2F7HZ7395
 *				LME2510C + LG TDQY-P001F
 *				LME2510C + BS2F7HZ0194
 *				LME2510 + LG TDQY-P001F
 *				LME2510 + BS2F7HZ0194
 *
 * MVB7395 (LME2510C+SHARP:BS2F7HZ7395)
 * SHARP:BS2F7HZ7395 = (STV0288+Sharp IX2505V)
 *
 * MV001F (LME2510+LGTDQY-P001F)
 * LG TDQY - P001F =(TDA8263 + TDA10086H)
 *
 * MVB0001F (LME2510C+LGTDQT-P001F)
 *
 * MV0194 (LME2510+SHARP:BS2F7HZ0194)
 * SHARP:BS2F7HZ0194 = (STV0299+IX2410)
 *
 * MVB0194 (LME2510C+SHARP0194)
 *
 * LME2510C + M88RS2000
 *
 * For firmware see Documentation/admin-guide/media/lmedm04.rst
 *
 * I2C addresses:
 * 0xd0 - STV0288	- Demodulator
 * 0xc0 - Sharp IX2505V	- Tuner
 * --
 * 0x1c - TDA10086   - Demodulator
 * 0xc0 - TDA8263    - Tuner
 * --
 * 0xd0 - STV0299	- Demodulator
 * 0xc0 - IX2410	- Tuner
 *
 * VID = 3344  PID LME2510=1122 LME2510C=1120
 *
 * Copyright (C) 2010 Malcolm Priestley ([email protected])
 * LME2510(C)(C) Leaguerme (Shenzhen) MicroElectronics Co., Ltd.
 *
 * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information
 *
 * Known Issues :
 *	LME2510: Non Intel USB chipsets fail to maintain High Speed on
 * Boot or Hot Plug.
 *
 * QQbox suffers from noise on LNB voltage.
 *
 *	LME2510: SHARP:BS2F7HZ0194(MV0194) cannot cold reset and share system
 * with other tuners. After a cold reset streaming will not start.
 *
 * M88RS2000 suffers from loss of lock.
 */
#define DVB_USB_LOG_PREFIX
#include <linux/usb.h>
#include <linux/usb/input.h>
#include <media/rc-core.h>

#include "dvb_usb.h"
#include "lmedm04.h"
#include "tda826x.h"
#include "tda10086.h"
#include "stv0288.h"
#include "ix2505v.h"
#include "stv0299.h"
#include "dvb-pll.h"
#include "z0194a.h"
#include "m88rs2000.h"
#include "ts2020.h"


#define LME2510_C_S7395
#define LME2510_C_LG
#define LME2510_C_S0194
#define LME2510_C_RS2000
#define LME2510_LG
#define LME2510_S0194

/* debug */
static int dvb_usb_lme2510_debug;
#define lme_debug(var, level, args...)
#define deb_info(level, args...)
#define debug_data_snipet(level, name, p)
#define info(args...)

module_param_named(debug, dvb_usb_lme2510_debug, int, 0644);
MODULE_PARM_DESC();

static int dvb_usb_lme2510_firmware;
module_param_named(firmware, dvb_usb_lme2510_firmware, int, 0644);
MODULE_PARM_DESC();

static int pid_filter;
module_param_named(pid, pid_filter, int, 0644);
MODULE_PARM_DESC();


DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);

#define TUNER_DEFAULT
#define TUNER_LG
#define TUNER_S7395
#define TUNER_S0194
#define TUNER_RS2000

struct lme2510_state {};

static int lme2510_usb_talk(struct dvb_usb_device *d,
			    u8 *wbuf, int wlen, u8 *rbuf, int rlen)
{}

static int lme2510_stream_restart(struct dvb_usb_device *d)
{}

static int lme2510_enable_pid(struct dvb_usb_device *d, u8 index, u16 pid_out)
{}

/* Convert range from 0x00-0xff to 0x0000-0xffff */
#define reg_to_16bits(x)

static void lme2510_update_stats(struct dvb_usb_adapter *adap)
{}

static void lme2510_int_response(struct urb *lme_urb)
{}

static int lme2510_int_read(struct dvb_usb_adapter *adap)
{}

static int lme2510_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
{}

static int lme2510_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid,
	int onoff)
{}


static int lme2510_return_status(struct dvb_usb_device *d)
{}

static int lme2510_msg(struct dvb_usb_device *d,
		u8 *wbuf, int wlen, u8 *rbuf, int rlen)
{}

static int lme2510_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
				 int num)
{}

static u32 lme2510_i2c_func(struct i2c_adapter *adapter)
{}

static struct i2c_algorithm lme2510_i2c_algo =;

static int lme2510_streaming_ctrl(struct dvb_frontend *fe, int onoff)
{}

static u8 check_sum(u8 *p, u8 len)
{}

static int lme2510_download_firmware(struct dvb_usb_device *d,
					const struct firmware *fw)
{}

static void lme_coldreset(struct dvb_usb_device *d)
{}

static const char fw_c_s7395[] = LME2510_C_S7395;
static const char fw_c_lg[] = LME2510_C_LG;
static const char fw_c_s0194[] = LME2510_C_S0194;
static const char fw_c_rs2000[] = LME2510_C_RS2000;
static const char fw_lg[] = LME2510_LG;
static const char fw_s0194[] = LME2510_S0194;

static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold)
{}

static struct tda10086_config tda10086_config =;

static struct stv0288_config lme_config =;

static struct ix2505v_config lme_tuner =;

static struct stv0299_config sharp_z0194_config =;

static struct m88rs2000_config m88rs2000_config =;

static struct ts2020_config ts2020_config =;

static int dm04_lme2510_set_voltage(struct dvb_frontend *fe,
				    enum fe_sec_voltage voltage)
{}

static int dm04_read_status(struct dvb_frontend *fe, enum fe_status *status)
{}

static int dm04_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
{}

static int dm04_read_snr(struct dvb_frontend *fe, u16 *snr)
{}

static int dm04_read_ber(struct dvb_frontend *fe, u32 *ber)
{}

static int dm04_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
{}

static int lme_name(struct dvb_usb_adapter *adap)
{}

static int dm04_lme2510_frontend_attach(struct dvb_usb_adapter *adap)
{}

static int dm04_lme2510_tuner(struct dvb_usb_adapter *adap)
{}

static int lme2510_powerup(struct dvb_usb_device *d, int onoff)
{}

static int lme2510_identify_state(struct dvb_usb_device *d, const char **name)
{}

static int lme2510_get_stream_config(struct dvb_frontend *fe, u8 *ts_type,
		struct usb_data_stream_properties *stream)
{}

static int lme2510_get_rc_config(struct dvb_usb_device *d,
	struct dvb_usb_rc *rc)
{}

static void lme2510_exit(struct dvb_usb_device *d)
{}

static struct dvb_usb_device_properties lme2510_props =;

static const struct usb_device_id lme2510_id_table[] =;

MODULE_DEVICE_TABLE(usb, lme2510_id_table);

static struct usb_driver lme2510_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_VERSION();
MODULE_LICENSE();
MODULE_FIRMWARE(LME2510_C_S7395);
MODULE_FIRMWARE(LME2510_C_LG);
MODULE_FIRMWARE(LME2510_C_S0194);
MODULE_FIRMWARE(LME2510_C_RS2000);
MODULE_FIRMWARE(LME2510_LG);
MODULE_FIRMWARE(LME2510_S0194);