#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/videodev2.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include <media/v4l2-fwnode.h>
#include <media/videobuf2-dma-contig.h>
#include <media/v4l2-image-sizes.h>
#include "atmel-isi.h"
#define MAX_SUPPORT_WIDTH …
#define MAX_SUPPORT_HEIGHT …
#define MIN_FRAME_RATE …
#define FRAME_INTERVAL_MILLI_SEC …
struct fbd { … };
static void set_dma_ctrl(struct fbd *fb_desc, u32 ctrl)
{ … }
struct isi_dma_desc { … };
struct frame_buffer { … };
struct isi_graph_entity { … };
struct isi_format { … };
struct atmel_isi { … };
#define notifier_to_isi(n) …
static void isi_writel(struct atmel_isi *isi, u32 reg, u32 val)
{ … }
static u32 isi_readl(struct atmel_isi *isi, u32 reg)
{ … }
static void configure_geometry(struct atmel_isi *isi)
{ … }
static irqreturn_t atmel_isi_handle_streaming(struct atmel_isi *isi)
{ … }
static irqreturn_t isi_interrupt(int irq, void *dev_id)
{ … }
#define WAIT_ISI_RESET …
#define WAIT_ISI_DISABLE …
static int atmel_isi_wait_status(struct atmel_isi *isi, int wait_reset)
{ … }
static int queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers, unsigned int *nplanes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int buffer_init(struct vb2_buffer *vb)
{ … }
static int buffer_prepare(struct vb2_buffer *vb)
{ … }
static void buffer_cleanup(struct vb2_buffer *vb)
{ … }
static void start_dma(struct atmel_isi *isi, struct frame_buffer *buffer)
{ … }
static void buffer_queue(struct vb2_buffer *vb)
{ … }
static int start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void stop_streaming(struct vb2_queue *vq)
{ … }
static const struct vb2_ops isi_video_qops = …;
static int isi_g_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *fmt)
{ … }
static const struct isi_format *find_format_by_fourcc(struct atmel_isi *isi,
unsigned int fourcc)
{ … }
static void isi_try_fse(struct atmel_isi *isi, const struct isi_format *isi_fmt,
struct v4l2_subdev_state *sd_state)
{ … }
static int isi_try_fmt(struct atmel_isi *isi, struct v4l2_format *f,
const struct isi_format **current_fmt)
{ … }
static int isi_set_fmt(struct atmel_isi *isi, struct v4l2_format *f)
{ … }
static int isi_s_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int isi_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int isi_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int isi_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int isi_enum_input(struct file *file, void *priv,
struct v4l2_input *i)
{ … }
static int isi_g_input(struct file *file, void *priv, unsigned int *i)
{ … }
static int isi_s_input(struct file *file, void *priv, unsigned int i)
{ … }
static int isi_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{ … }
static int isi_s_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{ … }
static int isi_enum_framesizes(struct file *file, void *fh,
struct v4l2_frmsizeenum *fsize)
{ … }
static int isi_enum_frameintervals(struct file *file, void *fh,
struct v4l2_frmivalenum *fival)
{ … }
static int isi_camera_set_bus_param(struct atmel_isi *isi)
{ … }
static int atmel_isi_parse_dt(struct atmel_isi *isi,
struct platform_device *pdev)
{ … }
static int isi_open(struct file *file)
{ … }
static int isi_release(struct file *file)
{ … }
static const struct v4l2_ioctl_ops isi_ioctl_ops = …;
static const struct v4l2_file_operations isi_fops = …;
static int isi_set_default_fmt(struct atmel_isi *isi)
{ … }
static const struct isi_format isi_formats[] = …;
static int isi_formats_init(struct atmel_isi *isi)
{ … }
static int isi_graph_notify_complete(struct v4l2_async_notifier *notifier)
{ … }
static void isi_graph_notify_unbind(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *sd,
struct v4l2_async_connection *asd)
{ … }
static int isi_graph_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
struct v4l2_async_connection *asd)
{ … }
static const struct v4l2_async_notifier_operations isi_graph_notify_ops = …;
static int isi_graph_init(struct atmel_isi *isi)
{ … }
static int atmel_isi_probe(struct platform_device *pdev)
{ … }
static void atmel_isi_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int atmel_isi_runtime_suspend(struct device *dev)
{ … }
static int atmel_isi_runtime_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops atmel_isi_dev_pm_ops = …;
static const struct of_device_id atmel_isi_of_match[] = …;
MODULE_DEVICE_TABLE(of, atmel_isi_of_match);
static struct platform_driver atmel_isi_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;