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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for Zarlink zl10036 DVB-S silicon tuner
 *
 * Copyright (C) 2006 Tino Reichardt
 * Copyright (C) 2007-2009 Matthias Schwarzott <[email protected]>
 *
 **
 * The data sheet for this tuner can be found at:
 *    http://www.mcmilk.de/projects/dvb-card/datasheets/ZL10036.pdf
 *
 * This one is working: (at my Avermedia DVB-S Pro)
 * - zl10036 (40pin, FTA)
 *
 * A driver for zl10038 should be very similar.
 */

#include <linux/module.h>
#include <linux/dvb/frontend.h>
#include <linux/slab.h>
#include <linux/types.h>

#include "zl10036.h"

static int zl10036_debug;
#define dprintk(level, args...)

#define deb_info(args...)
#define deb_i2c(args...)

struct zl10036_state {};


/* This driver assumes the tuner is driven by a 10.111MHz Cristal */
#define _XTAL

/* Some of the possible dividers:
 *   64, (write 0x05 to reg), freq step size   158kHz
 *   10, (write 0x0a to reg), freq step size 1.011kHz (used here)
 *    5, (write 0x09 to reg), freq step size 2.022kHz
 */

#define _RDIV
#define _RDIV_REG
#define _FR

#define STATUS_POR
#define STATUS_FL

/* read/write for zl10036 and zl10038 */

static int zl10036_read_status_reg(struct zl10036_state *state)
{}

static int zl10036_write(struct zl10036_state *state, u8 buf[], u8 count)
{}

static void zl10036_release(struct dvb_frontend *fe)
{}

static int zl10036_sleep(struct dvb_frontend *fe)
{}

/*
 * register map of the ZL10036/ZL10038
 *
 * reg[default] content
 *  2[0x00]:   0 | N14 | N13 | N12 | N11 | N10 |  N9 |  N8
 *  3[0x00]:  N7 |  N6 |  N5 |  N4 |  N3 |  N2 |  N1 |  N0
 *  4[0x80]:   1 |   0 | RFG | BA1 | BA0 | BG1 | BG0 | LEN
 *  5[0x00]:  P0 |  C1 |  C0 |  R4 |  R3 |  R2 |  R1 |  R0
 *  6[0xc0]:   1 |   1 |   0 |   0 | RSD |   0 |   0 |   0
 *  7[0x20]:  P1 | BF6 | BF5 | BF4 | BF3 | BF2 | BF1 |   0
 *  8[0xdb]:   1 |   1 |   0 |   1 |   0 |  CC |   1 |   1
 *  9[0x30]: VSD |  V2 |  V1 |  V0 |  S3 |  S2 |  S1 |  S0
 * 10[0xe1]:   1 |   1 |   1 |   0 |   0 | LS2 | LS1 | LS0
 * 11[0xf5]:  WS | WH2 | WH1 | WH0 | WL2 | WL1 | WL0 | WRE
 * 12[0xf0]:   1 |   1 |   1 |   1 |   0 |   0 |   0 |   0
 * 13[0x28]:  PD | BR4 | BR3 | BR2 | BR1 | BR0 | CLR |  TL
 */

static int zl10036_set_frequency(struct zl10036_state *state, u32 frequency)
{}

static int zl10036_set_bandwidth(struct zl10036_state *state, u32 fbw)
{}

static int zl10036_set_gain_params(struct zl10036_state *state,
	int c)
{}

static int zl10036_set_params(struct dvb_frontend *fe)
{}

static int zl10036_get_frequency(struct dvb_frontend *fe, u32 *frequency)
{}

static int zl10036_init_regs(struct zl10036_state *state)
{}

static int zl10036_init(struct dvb_frontend *fe)
{}

static const struct dvb_tuner_ops zl10036_tuner_ops =;

struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe,
				    const struct zl10036_config *config,
				    struct i2c_adapter *i2c)
{}
EXPORT_SYMBOL_GPL();

module_param_named(debug, zl10036_debug, int, 0644);
MODULE_PARM_DESC();
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_LICENSE();