#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 { … };
struct si476x_radio { … };
static inline struct si476x_radio *
v4l2_ctrl_handler_to_radio(struct v4l2_ctrl_handler *d)
{ … }
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(…) …;