linux/drivers/media/radio/radio-tea5777.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   v4l2 driver for TEA5777 Philips AM/FM radio tuner chips
 *
 *	Copyright (c) 2012 Hans de Goede <[email protected]>
 *
 *   Based on the ALSA driver for TEA5757/5759 Philips AM/FM radio tuner chips:
 *
 *	Copyright (c) 2004 Jaroslav Kysela <[email protected]>
 */

#include <linux/delay.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <media/v4l2-device.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include "radio-tea5777.h"

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

#define TEA5777_FM_IF
#define TEA5777_FM_FREQ_STEP

#define TEA5777_AM_IF
#define TEA5777_AM_FREQ_STEP

/* Write reg, common bits */
#define TEA5777_W_MUTE_MASK
#define TEA5777_W_MUTE_SHIFT
#define TEA5777_W_AM_FM_MASK
#define TEA5777_W_AM_FM_SHIFT
#define TEA5777_W_STB_MASK
#define TEA5777_W_STB_SHIFT

#define TEA5777_W_IFCE_MASK
#define TEA5777_W_IFCE_SHIFT
#define TEA5777_W_IFW_MASK
#define TEA5777_W_IFW_SHIFT
#define TEA5777_W_HILO_MASK
#define TEA5777_W_HILO_SHIFT
#define TEA5777_W_DBUS_MASK
#define TEA5777_W_DBUS_SHIFT

#define TEA5777_W_INTEXT_MASK
#define TEA5777_W_INTEXT_SHIFT
#define TEA5777_W_P1_MASK
#define TEA5777_W_P1_SHIFT
#define TEA5777_W_P0_MASK
#define TEA5777_W_P0_SHIFT
#define TEA5777_W_PEN1_MASK
#define TEA5777_W_PEN1_SHIFT
#define TEA5777_W_PEN0_MASK
#define TEA5777_W_PEN0_SHIFT

#define TEA5777_W_CHP0_MASK
#define TEA5777_W_CHP0_SHIFT
#define TEA5777_W_DEEM_MASK
#define TEA5777_W_DEEM_SHIFT

#define TEA5777_W_SEARCH_MASK
#define TEA5777_W_SEARCH_SHIFT
#define TEA5777_W_PROGBLIM_MASK
#define TEA5777_W_PROGBLIM_SHIFT
#define TEA5777_W_UPDWN_MASK
#define TEA5777_W_UPDWN_SHIFT
#define TEA5777_W_SLEV_MASK
#define TEA5777_W_SLEV_SHIFT

/* Write reg, FM specific bits */
#define TEA5777_W_FM_PLL_MASK
#define TEA5777_W_FM_PLL_SHIFT
#define TEA5777_W_FM_FREF_MASK
#define TEA5777_W_FM_FREF_SHIFT
#define TEA5777_W_FM_FREF_VALUE

#define TEA5777_W_FM_FORCEMONO_MASK
#define TEA5777_W_FM_FORCEMONO_SHIFT
#define TEA5777_W_FM_SDSOFF_MASK
#define TEA5777_W_FM_SDSOFF_SHIFT
#define TEA5777_W_FM_DOFF_MASK
#define TEA5777_W_FM_DOFF_SHIFT

#define TEA5777_W_FM_STEP_MASK
#define TEA5777_W_FM_STEP_SHIFT

/* Write reg, AM specific bits */
#define TEA5777_W_AM_PLL_MASK
#define TEA5777_W_AM_PLL_SHIFT
#define TEA5777_W_AM_AGCRF_MASK
#define TEA5777_W_AM_AGCRF_SHIFT
#define TEA5777_W_AM_AGCIF_MASK
#define TEA5777_W_AM_AGCIF_SHIFT
#define TEA5777_W_AM_MWLW_MASK
#define TEA5777_W_AM_MWLW_SHIFT
#define TEA5777_W_AM_LW
#define TEA5777_W_AM_MW
#define TEA5777_W_AM_LNA_MASK
#define TEA5777_W_AM_LNA_SHIFT

#define TEA5777_W_AM_PEAK_MASK
#define TEA5777_W_AM_PEAK_SHIFT

#define TEA5777_W_AM_RFB_MASK
#define TEA5777_W_AM_RFB_SHIFT
#define TEA5777_W_AM_CALLIGN_MASK
#define TEA5777_W_AM_CALLIGN_SHIFT
#define TEA5777_W_AM_CBANK_MASK
#define TEA5777_W_AM_CBANK_SHIFT

#define TEA5777_W_AM_DELAY_MASK
#define TEA5777_W_AM_DELAY_SHIFT
#define TEA5777_W_AM_STEP_MASK
#define TEA5777_W_AM_STEP_SHIFT

/* Read reg, common bits */
#define TEA5777_R_LEVEL_MASK
#define TEA5777_R_LEVEL_SHIFT
#define TEA5777_R_SFOUND_MASK
#define TEA5777_R_SFOUND_SHIFT
#define TEA5777_R_BLIM_MASK
#define TEA5777_R_BLIM_SHIFT

/* Read reg, FM specific bits */
#define TEA5777_R_FM_STEREO_MASK
#define TEA5777_R_FM_STEREO_SHIFT
#define TEA5777_R_FM_PLL_MASK
#define TEA5777_R_FM_PLL_SHIFT

enum {};

static const struct v4l2_frequency_band bands[] =;

static u32 tea5777_freq_to_v4l2_freq(struct radio_tea5777 *tea, u32 freq)
{}

int radio_tea5777_set_freq(struct radio_tea5777 *tea)
{}

static int radio_tea5777_update_read_reg(struct radio_tea5777 *tea, int wait)
{}

/*
 * Linux Video interface
 */

static int vidioc_querycap(struct file *file, void  *priv,
					struct v4l2_capability *v)
{}

static int vidioc_enum_freq_bands(struct file *file, void *priv,
					 struct v4l2_frequency_band *band)
{}

static int vidioc_g_tuner(struct file *file, void *priv,
					struct v4l2_tuner *v)
{}

static int vidioc_s_tuner(struct file *file, void *priv,
					const struct v4l2_tuner *v)
{}

static int vidioc_g_frequency(struct file *file, void *priv,
					struct v4l2_frequency *f)
{}

static int vidioc_s_frequency(struct file *file, void *priv,
					const struct v4l2_frequency *f)
{}

static int vidioc_s_hw_freq_seek(struct file *file, void *fh,
					const struct v4l2_hw_freq_seek *a)
{}

static int tea575x_s_ctrl(struct v4l2_ctrl *c)
{}

static const struct v4l2_file_operations tea575x_fops =;

static const struct v4l2_ioctl_ops tea575x_ioctl_ops =;

static const struct video_device tea575x_radio =;

static const struct v4l2_ctrl_ops tea575x_ctrl_ops =;

int radio_tea5777_init(struct radio_tea5777 *tea, struct module *owner)
{}
EXPORT_SYMBOL_GPL();

void radio_tea5777_exit(struct radio_tea5777 *tea)
{}
EXPORT_SYMBOL_GPL();