linux/drivers/media/tuners/tea5761.c

// SPDX-License-Identifier: GPL-2.0
// For Philips TEA5761 FM Chip
// I2C address is always 0x20 (0x10 at 7-bit mode).
//
// Copyright (c) 2005-2007 Mauro Carvalho Chehab <[email protected]>

#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/videodev2.h>
#include <media/tuner.h>
#include "tuner-i2c.h"
#include "tea5761.h"

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

struct tea5761_priv {};

/*****************************************************************************/

/***************************
 * TEA5761HN I2C registers *
 ***************************/

/* INTREG - Read: bytes 0 and 1 / Write: byte 0 */

	/* first byte for reading */
#define TEA5761_INTREG_IFFLAG
#define TEA5761_INTREG_LEVFLAG
#define TEA5761_INTREG_FRRFLAG
#define TEA5761_INTREG_BLFLAG

	/* second byte for reading / byte for writing */
#define TEA5761_INTREG_IFMSK
#define TEA5761_INTREG_LEVMSK
#define TEA5761_INTREG_FRMSK
#define TEA5761_INTREG_BLMSK

/* FRQSET - Read: bytes 2 and 3 / Write: byte 1 and 2 */

	/* First byte */
#define TEA5761_FRQSET_SEARCH_UP
#define TEA5761_FRQSET_SEARCH_MODE

	/* Bits 0-5 for divider MSB */

	/* Second byte */
	/* Bits 0-7 for divider LSB */

/* TNCTRL - Read: bytes 4 and 5 / Write: Bytes 3 and 4 */

	/* first byte */

#define TEA5761_TNCTRL_PUPD_0
#define TEA5761_TNCTRL_BLIM
#define TEA5761_TNCTRL_SWPM
#define TEA5761_TNCTRL_IFCTC
#define TEA5761_TNCTRL_AFM
#define TEA5761_TNCTRL_SMUTE
#define TEA5761_TNCTRL_SNC

	/* second byte */

#define TEA5761_TNCTRL_MU
#define TEA5761_TNCTRL_SSL_1
#define TEA5761_TNCTRL_SSL_0
#define TEA5761_TNCTRL_HLSI
#define TEA5761_TNCTRL_MST
#define TEA5761_TNCTRL_SWP
#define TEA5761_TNCTRL_DTC
#define TEA5761_TNCTRL_AHLSI

/* FRQCHECK - Read: bytes 6 and 7  */
	/* First byte */

	/* Bits 0-5 for divider MSB */

	/* Second byte */
	/* Bits 0-7 for divider LSB */

/* TUNCHECK - Read: bytes 8 and 9  */

	/* First byte */
#define TEA5761_TUNCHECK_IF_MASK
#define TEA5761_TUNCHECK_TUNTO

	/* Second byte */
#define TEA5761_TUNCHECK_LEV_MASK
#define TEA5761_TUNCHECK_LD
#define TEA5761_TUNCHECK_STEREO

/* TESTREG - Read: bytes 10 and 11 / Write: bytes 5 and 6 */

	/* All zero = no test mode */

/* MANID - Read: bytes 12 and 13 */

	/* First byte - should be 0x10 */
#define TEA5767_MANID_VERSION_MASK
#define TEA5767_MANID_ID_MSB_MASK

	/* Second byte - Should be 0x2b */

#define TEA5767_MANID_ID_LSB_MASK
#define TEA5767_MANID_IDAV

/* Chip ID - Read: bytes 14 and 15 */

	/* First byte - should be 0x57 */

	/* Second byte - should be 0x61 */

/*****************************************************************************/

#define FREQ_OFFSET
static void tea5761_status_dump(unsigned char *buffer)
{}

/* Freq should be specifyed at 62.5 Hz */
static int __set_radio_freq(struct dvb_frontend *fe,
			    unsigned int freq,
			    bool mono)
{}

static int set_radio_freq(struct dvb_frontend *fe,
			  struct analog_parameters *params)
{}

static int set_radio_sleep(struct dvb_frontend *fe)
{}

static int tea5761_read_status(struct dvb_frontend *fe, char *buffer)
{}

static inline int tea5761_signal(struct dvb_frontend *fe, const char *buffer)
{}

static inline int tea5761_stereo(struct dvb_frontend *fe, const char *buffer)
{}

static int tea5761_get_status(struct dvb_frontend *fe, u32 *status)
{}

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

int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr)
{}

static void tea5761_release(struct dvb_frontend *fe)
{}

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

static const struct dvb_tuner_ops tea5761_tuner_ops =;

struct dvb_frontend *tea5761_attach(struct dvb_frontend *fe,
				    struct i2c_adapter* i2c_adap,
				    u8 i2c_addr)
{}


EXPORT_SYMBOL_GPL();
EXPORT_SYMBOL_GPL();

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