#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <media/v4l2-ioctl.h>
#include "vpif.h"
#include "vpif_display.h"
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…);
#define VPIF_V4L2_STD …
#define vpif_err(fmt, arg...) …
#define vpif_dbg(level, debug, fmt, arg...) …
static int debug = …;
module_param(debug, int, 0644);
MODULE_PARM_DESC(…) …;
#define VPIF_DRIVER_NAME …
MODULE_ALIAS(…) …;
static int ycmux_mode;
static u8 channel_first_int[VPIF_NUMOBJECTS][2] = …;
static struct vpif_device vpif_obj = …;
static struct device *vpif_dev;
static void vpif_calculate_offsets(struct channel_obj *ch);
static void vpif_config_addr(struct channel_obj *ch, int muxmode);
static inline
struct vpif_disp_buffer *to_vpif_buffer(struct vb2_v4l2_buffer *vb)
{ … }
static int vpif_buffer_prepare(struct vb2_buffer *vb)
{ … }
static int vpif_buffer_queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers, unsigned int *nplanes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static void vpif_buffer_queue(struct vb2_buffer *vb)
{ … }
static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void vpif_stop_streaming(struct vb2_queue *vq)
{ … }
static const struct vb2_ops video_qops = …;
static void process_progressive_mode(struct common_obj *common)
{ … }
static void process_interlaced_mode(int fid, struct common_obj *common)
{ … }
static irqreturn_t vpif_channel_isr(int irq, void *dev_id)
{ … }
static int vpif_update_std_info(struct channel_obj *ch)
{ … }
static int vpif_update_resolution(struct channel_obj *ch)
{ … }
static void vpif_calculate_offsets(struct channel_obj *ch)
{ … }
static void vpif_config_addr(struct channel_obj *ch, int muxmode)
{ … }
static int vpif_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int vpif_enum_fmt_vid_out(struct file *file, void *priv,
struct v4l2_fmtdesc *fmt)
{ … }
static int vpif_g_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *fmt)
{ … }
static int vpif_try_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *fmt)
{ … }
static int vpif_s_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *fmt)
{ … }
static int vpif_s_std(struct file *file, void *priv, v4l2_std_id std_id)
{ … }
static int vpif_g_std(struct file *file, void *priv, v4l2_std_id *std)
{ … }
static int vpif_enum_output(struct file *file, void *fh,
struct v4l2_output *output)
{ … }
static int
vpif_output_to_subdev(struct vpif_display_config *vpif_cfg,
struct vpif_display_chan_config *chan_cfg, int index)
{ … }
static int vpif_set_output(struct vpif_display_config *vpif_cfg,
struct channel_obj *ch, int index)
{ … }
static int vpif_s_output(struct file *file, void *priv, unsigned int i)
{ … }
static int vpif_g_output(struct file *file, void *priv, unsigned int *i)
{ … }
static int
vpif_enum_dv_timings(struct file *file, void *priv,
struct v4l2_enum_dv_timings *timings)
{ … }
static int vpif_s_dv_timings(struct file *file, void *priv,
struct v4l2_dv_timings *timings)
{ … }
static int vpif_g_dv_timings(struct file *file, void *priv,
struct v4l2_dv_timings *timings)
{ … }
static int vpif_log_status(struct file *filep, void *priv)
{ … }
static const struct v4l2_ioctl_ops vpif_ioctl_ops = …;
static const struct v4l2_file_operations vpif_fops = …;
static int initialize_vpif(void)
{ … }
static void free_vpif_objs(void)
{ … }
static int vpif_probe_complete(void)
{ … }
static __init int vpif_probe(struct platform_device *pdev)
{ … }
static void vpif_remove(struct platform_device *device)
{ … }
#ifdef CONFIG_PM_SLEEP
static int vpif_suspend(struct device *dev)
{ … }
static int vpif_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(vpif_pm_ops, vpif_suspend, vpif_resume);
static __refdata struct platform_driver vpif_driver = …;
module_platform_driver(…) …;