linux/drivers/media/radio/saa7706h.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * saa7706.c Philips SAA7706H Car Radio DSP driver
 * Copyright (c) 2009 Intel Corporation
 */

#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ctrls.h>

#define DRIVER_NAME

/* the I2C memory map looks like this

	$1C00 - $FFFF Not Used
	$2200 - $3FFF Reserved YRAM (DSP2) space
	$2000 - $21FF YRAM (DSP2)
	$1FF0 - $1FFF Hardware Registers
	$1280 - $1FEF Reserved XRAM (DSP2) space
	$1000 - $127F XRAM (DSP2)
	$0FFF        DSP CONTROL
	$0A00 - $0FFE Reserved
	$0980 - $09FF Reserved YRAM (DSP1) space
	$0800 - $097F YRAM (DSP1)
	$0200 - $07FF Not Used
	$0180 - $01FF Reserved XRAM (DSP1) space
	$0000 - $017F XRAM (DSP1)
*/

#define SAA7706H_REG_CTRL
#define SAA7706H_CTRL_BYP_PLL
#define SAA7706H_CTRL_PLL_DIV_MASK
#define SAA7706H_CTRL_PLL3_62975MHZ
#define SAA7706H_CTRL_DSP_TURBO
#define SAA7706H_CTRL_PC_RESET_DSP1
#define SAA7706H_CTRL_PC_RESET_DSP2
#define SAA7706H_CTRL_DSP1_ROM_EN_MASK
#define SAA7706H_CTRL_DSP1_FUNC_PROM
#define SAA7706H_CTRL_DSP2_ROM_EN_MASK
#define SAA7706H_CTRL_DSP2_FUNC_PROM
#define SAA7706H_CTRL_DIG_SIL_INTERPOL

#define SAA7706H_REG_EVALUATION
#define SAA7706H_EVAL_DISABLE_CHARGE_PUMP
#define SAA7706H_EVAL_DCS_CLOCK
#define SAA7706H_EVAL_GNDRC1_ENABLE
#define SAA7706H_EVAL_GNDRC2_ENABLE

#define SAA7706H_REG_CL_GEN1
#define SAA7706H_CL_GEN1_MIN_LOOPGAIN_MASK
#define SAA7706H_CL_GEN1_LOOPGAIN_MASK
#define SAA7706H_CL_GEN1_COARSE_RATION

#define SAA7706H_REG_CL_GEN2
#define SAA7706H_CL_GEN2_WSEDGE_FALLING
#define SAA7706H_CL_GEN2_STOP_VCO
#define SAA7706H_CL_GEN2_FRERUN
#define SAA7706H_CL_GEN2_ADAPTIVE
#define SAA7706H_CL_GEN2_FINE_RATIO_MASK

#define SAA7706H_REG_CL_GEN4
#define SAA7706H_CL_GEN4_BYPASS_PLL1
#define SAA7706H_CL_GEN4_PLL1_DIV_MASK
#define SAA7706H_CL_GEN4_DSP1_TURBO

#define SAA7706H_REG_SEL
#define SAA7706H_SEL_DSP2_SRCA_MASK
#define SAA7706H_SEL_DSP2_FMTA_MASK
#define SAA7706H_SEL_DSP2_SRCB_MASK
#define SAA7706H_SEL_DSP2_FMTB_MASK
#define SAA7706H_SEL_DSP1_SRC_MASK
#define SAA7706H_SEL_DSP1_FMT_MASK
#define SAA7706H_SEL_SPDIF2
#define SAA7706H_SEL_HOST_IO_FMT_MASK
#define SAA7706H_SEL_EN_HOST_IO

#define SAA7706H_REG_IAC
#define SAA7706H_REG_CLK_SET
#define SAA7706H_REG_CLK_COEFF
#define SAA7706H_REG_INPUT_SENS
#define SAA7706H_INPUT_SENS_RDS_VOL_MASK
#define SAA7706H_INPUT_SENS_FM_VOL_MASK
#define SAA7706H_INPUT_SENS_FM_MPX
#define SAA7706H_INPUT_SENS_OFF_FILTER_A_EN
#define SAA7706H_INPUT_SENS_OFF_FILTER_B_EN
#define SAA7706H_REG_PHONE_NAV_AUDIO
#define SAA7706H_REG_IO_CONF_DSP2
#define SAA7706H_REG_STATUS_DSP2
#define SAA7706H_REG_PC_DSP2

#define SAA7706H_DSP1_MOD0
#define SAA7706H_DSP1_ROM_VER
#define SAA7706H_DSP2_MPTR0

#define SAA7706H_DSP1_MODPNTR

#define SAA7706H_DSP2_XMEM_CONTLLCW
#define SAA7706H_DSP2_XMEM_BUSAMP
#define SAA7706H_DSP2_XMEM_FDACPNTR
#define SAA7706H_DSP2_XMEM_IIS1PNTR

#define SAA7706H_DSP2_YMEM_PVGA
#define SAA7706H_DSP2_YMEM_PVAT1
#define SAA7706H_DSP2_YMEM_PVAT
#define SAA7706H_DSP2_YMEM_ROM_VER

#define SUPPORTED_DSP1_ROM_VER

struct saa7706h_state {};

static inline struct saa7706h_state *to_state(struct v4l2_subdev *sd)
{}

static int saa7706h_i2c_send(struct i2c_client *client, const u8 *data, int len)
{}

static int saa7706h_i2c_transfer(struct i2c_client *client,
	struct i2c_msg *msgs, int num)
{}

static int saa7706h_set_reg24(struct v4l2_subdev *sd, u16 reg, u32 val)
{}

static int saa7706h_set_reg24_err(struct v4l2_subdev *sd, u16 reg, u32 val,
	int *err)
{}

static int saa7706h_set_reg16(struct v4l2_subdev *sd, u16 reg, u16 val)
{}

static int saa7706h_set_reg16_err(struct v4l2_subdev *sd, u16 reg, u16 val,
	int *err)
{}

static int saa7706h_get_reg16(struct v4l2_subdev *sd, u16 reg)
{}

static int saa7706h_unmute(struct v4l2_subdev *sd)
{}

static int saa7706h_mute(struct v4l2_subdev *sd)
{}

static int saa7706h_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops saa7706h_ctrl_ops =;

static const struct v4l2_subdev_ops empty_ops =;

/*
 * Generic i2c probe
 * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1'
 */

static int saa7706h_probe(struct i2c_client *client)
{}

static void saa7706h_remove(struct i2c_client *client)
{}

static const struct i2c_device_id saa7706h_id[] =;

MODULE_DEVICE_TABLE(i2c, saa7706h_id);

static struct i2c_driver saa7706h_driver =;

module_i2c_driver();

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