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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * drivers/media/radio/radio-si476x.c -- V4L2 driver for SI476X chips
 *
 * Copyright (C) 2012 Innovative Converged Devices(ICD)
 * Copyright (C) 2013 Andrey Smirnov
 *
 * Author: Andrey Smirnov <[email protected]>
 */

#include <linux/module.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/atomic.h>
#include <linux/videodev2.h>
#include <linux/mutex.h>
#include <linux/debugfs.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-device.h>

#include <media/drv-intf/si476x.h>
#include <linux/mfd/si476x-core.h>

#define FM_FREQ_RANGE_LOW
#define FM_FREQ_RANGE_HIGH

#define AM_FREQ_RANGE_LOW
#define AM_FREQ_RANGE_HIGH

#define PWRLINEFLTR

#define FREQ_MUL

#define SI476X_PHDIV_STATUS_LINK_LOCKED(status)

#define DRIVER_NAME
#define DRIVER_CARD

enum si476x_freq_bands {};

static const struct v4l2_frequency_band si476x_bands[] =;

static inline bool si476x_radio_freq_is_inside_of_the_band(u32 freq, int band)
{}

static inline bool si476x_radio_range_is_inside_of_the_band(u32 low, u32 high,
							    int band)
{}

static int si476x_radio_s_ctrl(struct v4l2_ctrl *ctrl);
static int si476x_radio_g_volatile_ctrl(struct v4l2_ctrl *ctrl);

enum phase_diversity_modes_idx {};

static const char * const phase_diversity_modes[] =;

static inline enum phase_diversity_modes_idx
si476x_phase_diversity_mode_to_idx(enum si476x_phase_diversity_mode mode)
{}

static inline enum si476x_phase_diversity_mode
si476x_phase_diversity_idx_to_mode(enum phase_diversity_modes_idx idx)
{}

static const struct v4l2_ctrl_ops si476x_ctrl_ops =;


enum si476x_ctrl_idx {};
static struct v4l2_ctrl_config si476x_ctrls[] =;

struct si476x_radio;

/**
 * struct si476x_radio_ops - vtable of tuner functions
 *
 * This table holds pointers to functions implementing particular
 * operations depending on the mode in which the tuner chip was
 * configured to start. If the function is not supported
 * corresponding element is set to #NULL.
 *
 * @tune_freq: Tune chip to a specific frequency
 * @seek_start: Star station seeking
 * @rsq_status: Get Received Signal Quality(RSQ) status
 * @rds_blckcnt: Get received RDS blocks count
 * @phase_diversity: Change phase diversity mode of the tuner
 * @phase_div_status: Get phase diversity mode status
 * @acf_status: Get the status of Automatically Controlled
 * Features(ACF)
 * @agc_status: Get Automatic Gain Control(AGC) status
 */
struct si476x_radio_ops {};

/**
 * struct si476x_radio - radio device
 *
 * @v4l2dev: Pointer to V4L2 device created by V4L2 subsystem
 * @videodev: Pointer to video device created by V4L2 subsystem
 * @ctrl_handler: V4L2 controls handler
 * @core: Pointer to underlying core device
 * @ops: Vtable of functions. See struct si476x_radio_ops for details
 * @debugfs: pointer to &strucd dentry for debugfs
 * @audmode: audio mode, as defined for the rxsubchans field
 *	     at videodev2.h
 *
 * core structure is the radio device is being used
 */
struct si476x_radio {};

static inline struct si476x_radio *
v4l2_ctrl_handler_to_radio(struct v4l2_ctrl_handler *d)
{}

/*
 * si476x_vidioc_querycap - query device capabilities
 */
static int si476x_radio_querycap(struct file *file, void *priv,
				 struct v4l2_capability *capability)
{}

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

static int si476x_radio_g_tuner(struct file *file, void *priv,
				struct v4l2_tuner *tuner)
{}

static int si476x_radio_s_tuner(struct file *file, void *priv,
				const struct v4l2_tuner *tuner)
{}

static int si476x_radio_init_vtable(struct si476x_radio *radio,
				    enum si476x_func func)
{}

static int si476x_radio_pretune(struct si476x_radio *radio,
				enum si476x_func func)
{}
static int si476x_radio_do_post_powerup_init(struct si476x_radio *radio,
					     enum si476x_func func)
{}

static int si476x_radio_change_func(struct si476x_radio *radio,
				    enum si476x_func func)
{}

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

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

static int si476x_radio_s_hw_freq_seek(struct file *file, void *priv,
				       const struct v4l2_hw_freq_seek *seek)
{}

static int si476x_radio_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{}

static int si476x_radio_s_ctrl(struct v4l2_ctrl *ctrl)
{}

#ifdef CONFIG_VIDEO_ADV_DEBUG
static int si476x_radio_g_register(struct file *file, void *fh,
				   struct v4l2_dbg_register *reg)
{}
static int si476x_radio_s_register(struct file *file, void *fh,
				   const struct v4l2_dbg_register *reg)
{}
#endif

static int si476x_radio_fops_open(struct file *file)
{}

static int si476x_radio_fops_release(struct file *file)
{}

static ssize_t si476x_radio_fops_read(struct file *file, char __user *buf,
				      size_t count, loff_t *ppos)
{}

static __poll_t si476x_radio_fops_poll(struct file *file,
				struct poll_table_struct *pts)
{}

static const struct v4l2_file_operations si476x_fops =;


static const struct v4l2_ioctl_ops si4761_ioctl_ops =;


static const struct video_device si476x_viddev_template =;



static ssize_t si476x_radio_read_acf_blob(struct file *file,
					  char __user *user_buf,
					  size_t count, loff_t *ppos)
{}

static const struct file_operations radio_acf_fops =;

static ssize_t si476x_radio_read_rds_blckcnt_blob(struct file *file,
						  char __user *user_buf,
						  size_t count, loff_t *ppos)
{}

static const struct file_operations radio_rds_blckcnt_fops =;

static ssize_t si476x_radio_read_agc_blob(struct file *file,
					  char __user *user_buf,
					  size_t count, loff_t *ppos)
{}

static const struct file_operations radio_agc_fops =;

static ssize_t si476x_radio_read_rsq_blob(struct file *file,
					  char __user *user_buf,
					  size_t count, loff_t *ppos)
{}

static const struct file_operations radio_rsq_fops =;

static ssize_t si476x_radio_read_rsq_primary_blob(struct file *file,
						  char __user *user_buf,
						  size_t count, loff_t *ppos)
{}

static const struct file_operations radio_rsq_primary_fops =;


static void si476x_radio_init_debugfs(struct si476x_radio *radio)
{}


static int si476x_radio_add_new_custom(struct si476x_radio *radio,
				       enum si476x_ctrl_idx idx)
{}

static int si476x_radio_probe(struct platform_device *pdev)
{}

static void si476x_radio_remove(struct platform_device *pdev)
{}

MODULE_ALIAS();

static struct platform_driver si476x_radio_driver =;
module_platform_driver();

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