linux/drivers/media/i2c/saa6588.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
    Driver for SAA6588 RDS decoder

    (c) 2005 Hans J. Koch

*/


#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/types.h>
#include <linux/videodev2.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/wait.h>
#include <linux/uaccess.h>

#include <media/i2c/saa6588.h>
#include <media/v4l2-device.h>


/* insmod options */
static unsigned int debug;
static unsigned int xtal;
static unsigned int mmbs;
static unsigned int plvl;
static unsigned int bufblocks =;

module_param(debug, int, 0644);
MODULE_PARM_DESC();
module_param(xtal, int, 0);
MODULE_PARM_DESC();
module_param(mmbs, int, 0);
MODULE_PARM_DESC();
module_param(plvl, int, 0);
MODULE_PARM_DESC();
module_param(bufblocks, int, 0);
MODULE_PARM_DESC();

MODULE_DESCRIPTION();
MODULE_AUTHOR();

MODULE_LICENSE();

/* ---------------------------------------------------------------------- */

#define UNSET
#define PREFIX
#define dprintk

struct saa6588 {};

static inline struct saa6588 *to_saa6588(struct v4l2_subdev *sd)
{}

/* ---------------------------------------------------------------------- */

/*
 * SAA6588 defines
 */

/* Initialization and mode control byte (0w) */

/* bit 0+1 (DAC0/DAC1) */
#define cModeStandard
#define cModeFastPI
#define cModeReducedRequest
#define cModeInvalid

/* bit 2 (RBDS) */
#define cProcessingModeRDS
#define cProcessingModeRBDS

/* bit 3+4 (SYM0/SYM1) */
#define cErrCorrectionNone
#define cErrCorrection2Bits
#define cErrCorrection5Bits
#define cErrCorrectionNoneRBDS

/* bit 5 (NWSY) */
#define cSyncNormal
#define cSyncRestart

/* bit 6 (TSQD) */
#define cSigQualityDetectOFF
#define cSigQualityDetectON

/* bit 7 (SQCM) */
#define cSigQualityTriggered
#define cSigQualityContinous

/* Pause level and flywheel control byte (1w) */

/* bits 0..5 (FEB0..FEB5) */
#define cFlywheelMaxBlocksMask
#define cFlywheelDefault

/* bits 6+7 (PL0/PL1) */
#define cPauseLevel_11mV
#define cPauseLevel_17mV
#define cPauseLevel_27mV
#define cPauseLevel_43mV

/* Pause time/oscillator frequency/quality detector control byte (1w) */

/* bits 0..4 (SQS0..SQS4) */
#define cQualityDetectSensMask
#define cQualityDetectDefault

/* bit 5 (SOSC) */
#define cSelectOscFreqOFF
#define cSelectOscFreqON

/* bit 6+7 (PTF0/PTF1) */
#define cOscFreq_4332kHz
#define cOscFreq_8664kHz
#define cOscFreq_12996kHz
#define cOscFreq_17328kHz

/* ---------------------------------------------------------------------- */

static bool block_from_buf(struct saa6588 *s, unsigned char *buf)
{}

static void read_from_buf(struct saa6588 *s, struct saa6588_command *a)
{}

static void block_to_buf(struct saa6588 *s, unsigned char *blockbuf)
{}

static void saa6588_i2c_poll(struct saa6588 *s)
{}

static void saa6588_work(struct work_struct *work)
{}

static void saa6588_configure(struct saa6588 *s)
{}

/* ---------------------------------------------------------------------- */

static long saa6588_command(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
{}

static int saa6588_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
{}

static int saa6588_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
{}

/* ----------------------------------------------------------------------- */

static const struct v4l2_subdev_core_ops saa6588_core_ops =;

static const struct v4l2_subdev_tuner_ops saa6588_tuner_ops =;

static const struct v4l2_subdev_ops saa6588_ops =;

/* ---------------------------------------------------------------------- */

static int saa6588_probe(struct i2c_client *client)
{}

static void saa6588_remove(struct i2c_client *client)
{}

/* ----------------------------------------------------------------------- */

static const struct i2c_device_id saa6588_id[] =;
MODULE_DEVICE_TABLE(i2c, saa6588_id);

static struct i2c_driver saa6588_driver =;

module_i2c_driver();