linux/drivers/media/dvb-frontends/bcm3510.c

/*
 * Support for the Broadcom BCM3510 ATSC demodulator (1st generation Air2PC)
 *
 *  Copyright (C) 2001-5, B2C2 inc.
 *
 *  GPL/Linux driver written by Patrick Boettcher <[email protected]>
 *
 *  This driver is "hard-coded" to be used with the 1st generation of
 *  Technisat/B2C2's Air2PC ATSC PCI/USB cards/boxes. The pll-programming
 *  (Panasonic CT10S) is located here, which is actually wrong. Unless there is
 *  another device with a BCM3510, this is no problem.
 *
 *  The driver works also with QAM64 DVB-C, but had an unreasonable high
 *  UNC. (Tested with the Air2PC ATSC 1st generation)
 *
 *  You'll need a firmware for this driver in order to get it running. It is
 *  called "dvb-fe-bcm3510-01.fw".
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 675 Mass
 * Ave, Cambridge, MA 02139, USA.
 */

#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/firmware.h>
#include <linux/jiffies.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/mutex.h>

#include <media/dvb_frontend.h>
#include "bcm3510.h"
#include "bcm3510_priv.h"

/* Max transfer size done by bcm3510_do_hab_cmd() function */
#define MAX_XFER_SIZE

struct bcm3510_state {};

static int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC();

#define dprintk(level,x...)
#define dbufout(b,l,m)
#define deb_info(args...)
#define deb_i2c(args...)
#define deb_hab(args...)

/* transfer functions */
static int bcm3510_writebytes (struct bcm3510_state *state, u8 reg, u8 *buf, u8 len)
{}

static int bcm3510_readbytes (struct bcm3510_state *state, u8 reg, u8 *buf, u8 len)
{}

static int bcm3510_writeB(struct bcm3510_state *state, u8 reg, bcm3510_register_value v)
{}

static int bcm3510_readB(struct bcm3510_state *state, u8 reg, bcm3510_register_value *v)
{}

/* Host Access Buffer transfers */
static int bcm3510_hab_get_response(struct bcm3510_state *st, u8 *buf, int len)
{}

static int bcm3510_hab_send_request(struct bcm3510_state *st, u8 *buf, int len)
{}

static int bcm3510_do_hab_cmd(struct bcm3510_state *st, u8 cmd, u8 msgid, u8 *obuf, u8 olen, u8 *ibuf, u8 ilen)
{}

#if 0
/* not needed, we use a semaphore to prevent HAB races */
static int bcm3510_is_ap_ready(struct bcm3510_state *st)
{
	bcm3510_register_value ap,hab;
	int ret;

	if ((ret = bcm3510_readB(st,0xa8,&hab)) < 0 ||
		(ret = bcm3510_readB(st,0xa2,&ap) < 0))
		return ret;

	if (ap.APSTAT1_a2.RESET || ap.APSTAT1_a2.IDLE || ap.APSTAT1_a2.STOP || hab.HABSTAT_a8.HABR) {
		deb_info("AP is busy\n");
		return -EBUSY;
	}

	return 0;
}
#endif

static int bcm3510_bert_reset(struct bcm3510_state *st)
{}

static int bcm3510_refresh_state(struct bcm3510_state *st)
{}

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

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

static int bcm3510_read_unc(struct dvb_frontend* fe, u32* unc)
{}

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

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

/* tuner frontend programming */
static int bcm3510_tuner_cmd(struct bcm3510_state* st,u8 bc, u16 n, u8 a)
{}

static int bcm3510_set_freq(struct bcm3510_state* st,u32 freq)
{}

static int bcm3510_set_frontend(struct dvb_frontend *fe)
{}

static int bcm3510_sleep(struct dvb_frontend* fe)
{}

static int bcm3510_get_tune_settings(struct dvb_frontend *fe, struct dvb_frontend_tune_settings *s)
{}

static void bcm3510_release(struct dvb_frontend* fe)
{}

/* firmware download:
 * firmware file is build up like this:
 * 16bit addr, 16bit length, 8byte of length
 */
#define BCM3510_DEFAULT_FIRMWARE

static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, const u8 *b,
			     u16 len)
{}

static int bcm3510_download_firmware(struct dvb_frontend* fe)
{}

static int bcm3510_check_firmware_version(struct bcm3510_state *st)
{}

/* (un)resetting the AP */
static int bcm3510_reset(struct bcm3510_state *st)
{}

static int bcm3510_clear_reset(struct bcm3510_state *st)
{}

static int bcm3510_init_cold(struct bcm3510_state *st)
{}

static int bcm3510_init(struct dvb_frontend* fe)
{}


static const struct dvb_frontend_ops bcm3510_ops;

struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config,
				   struct i2c_adapter *i2c)
{}
EXPORT_SYMBOL_GPL();

static const struct dvb_frontend_ops bcm3510_ops =;

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