#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/drv-intf/msp3400.h>
#include <media/i2c/tvaudio.h>
#include "msp3400-driver.h"
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static int opmode = …;
int msp_debug;
bool msp_once;
bool msp_amsound;
int msp_standard = …;
bool msp_dolby;
int msp_stereo_thresh = …;
module_param(opmode, int, 0444);
module_param_named(once, msp_once, bool, 0644);
module_param_named(debug, msp_debug, int, 0644);
module_param_named(stereo_threshold, msp_stereo_thresh, int, 0644);
module_param_named(standard, msp_standard, int, 0644);
module_param_named(amsound, msp_amsound, bool, 0644);
module_param_named(dolby, msp_dolby, bool, 0644);
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
#define I2C_MSP_CONTROL …
#define I2C_MSP_DEM …
#define I2C_MSP_DSP …
int msp_reset(struct i2c_client *client)
{ … }
static int msp_read(struct i2c_client *client, int dev, int addr)
{ … }
int msp_read_dem(struct i2c_client *client, int addr)
{ … }
int msp_read_dsp(struct i2c_client *client, int addr)
{ … }
static int msp_write(struct i2c_client *client, int dev, int addr, int val)
{ … }
int msp_write_dem(struct i2c_client *client, int addr, int val)
{ … }
int msp_write_dsp(struct i2c_client *client, int addr, int val)
{ … }
static int scarts[3][9] = …;
static char *scart_names[] = …;
void msp_set_scart(struct i2c_client *client, int in, int out)
{ … }
static void msp_wake_thread(struct i2c_client *client)
{ … }
int msp_sleep(struct msp_state *state, int msec)
{ … }
static int msp_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
void msp_update_volume(struct msp_state *state)
{ … }
static int msp_s_radio(struct v4l2_subdev *sd)
{ … }
static int msp_s_frequency(struct v4l2_subdev *sd, const struct v4l2_frequency *freq)
{ … }
static int msp_querystd(struct v4l2_subdev *sd, v4l2_std_id *id)
{ … }
static int msp_s_std(struct v4l2_subdev *sd, v4l2_std_id id)
{ … }
static int msp_s_routing(struct v4l2_subdev *sd,
u32 input, u32 output, u32 config)
{ … }
static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
{ … }
static int msp_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
{ … }
static int msp_s_i2s_clock_freq(struct v4l2_subdev *sd, u32 freq)
{ … }
static int msp_log_status(struct v4l2_subdev *sd)
{ … }
#ifdef CONFIG_PM_SLEEP
static int msp_suspend(struct device *dev)
{ … }
static int msp_resume(struct device *dev)
{ … }
#endif
static const struct v4l2_ctrl_ops msp_ctrl_ops = …;
static const struct v4l2_subdev_core_ops msp_core_ops = …;
static const struct v4l2_subdev_video_ops msp_video_ops = …;
static const struct v4l2_subdev_tuner_ops msp_tuner_ops = …;
static const struct v4l2_subdev_audio_ops msp_audio_ops = …;
static const struct v4l2_subdev_ops msp_ops = …;
static const char * const opmode_str[] = …;
static int msp_probe(struct i2c_client *client)
{ … }
static void msp_remove(struct i2c_client *client)
{ … }
static const struct dev_pm_ops msp3400_pm_ops = …;
static const struct i2c_device_id msp_id[] = …;
MODULE_DEVICE_TABLE(i2c, msp_id);
static struct i2c_driver msp_driver = …;
module_i2c_driver(…) …;