#define pr_fmt(fmt) …
#include <linux/bug.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mem2mem.h>
#include <media/v4l2-rect.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>
#include <media/drv-intf/exynos-fimc.h>
#include "common.h"
#include "fimc-core.h"
#include "fimc-lite.h"
#include "fimc-lite-reg.h"
static int debug;
module_param(debug, int, 0644);
static const struct fimc_fmt fimc_lite_formats[] = …;
static const struct fimc_fmt *fimc_lite_find_format(const u32 *pixelformat,
const u32 *mbus_code, unsigned int mask, int index)
{ … }
static int fimc_lite_hw_init(struct fimc_lite *fimc, bool isp_output)
{ … }
static int fimc_lite_reinit(struct fimc_lite *fimc, bool suspend)
{ … }
static int fimc_lite_stop_capture(struct fimc_lite *fimc, bool suspend)
{ … }
static void fimc_lite_config_update(struct fimc_lite *fimc)
{ … }
static irqreturn_t flite_irq_handler(int irq, void *priv)
{ … }
static int start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void stop_streaming(struct vb2_queue *q)
{ … }
static int queue_setup(struct vb2_queue *vq,
unsigned int *num_buffers, unsigned int *num_planes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int buffer_prepare(struct vb2_buffer *vb)
{ … }
static void buffer_queue(struct vb2_buffer *vb)
{ … }
static const struct vb2_ops fimc_lite_qops = …;
static void fimc_lite_clear_event_counters(struct fimc_lite *fimc)
{ … }
static int fimc_lite_open(struct file *file)
{ … }
static int fimc_lite_release(struct file *file)
{ … }
static const struct v4l2_file_operations fimc_lite_fops = …;
static const struct fimc_fmt *fimc_lite_subdev_try_fmt(struct fimc_lite *fimc,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *format)
{ … }
static void fimc_lite_try_crop(struct fimc_lite *fimc, struct v4l2_rect *r)
{ … }
static void fimc_lite_try_compose(struct fimc_lite *fimc, struct v4l2_rect *r)
{ … }
static int fimc_lite_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int fimc_lite_enum_fmt(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int fimc_lite_g_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int fimc_lite_try_fmt(struct fimc_lite *fimc,
struct v4l2_pix_format_mplane *pixm,
const struct fimc_fmt **ffmt)
{ … }
static int fimc_lite_try_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int fimc_lite_s_fmt_mplane(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int fimc_pipeline_validate(struct fimc_lite *fimc)
{ … }
static int fimc_lite_streamon(struct file *file, void *priv,
enum v4l2_buf_type type)
{ … }
static int fimc_lite_streamoff(struct file *file, void *priv,
enum v4l2_buf_type type)
{ … }
static int fimc_lite_reqbufs(struct file *file, void *priv,
struct v4l2_requestbuffers *reqbufs)
{ … }
static int fimc_lite_g_selection(struct file *file, void *fh,
struct v4l2_selection *sel)
{ … }
static int fimc_lite_s_selection(struct file *file, void *fh,
struct v4l2_selection *sel)
{ … }
static const struct v4l2_ioctl_ops fimc_lite_ioctl_ops = …;
static int fimc_lite_link_setup(struct media_entity *entity,
const struct media_pad *local,
const struct media_pad *remote, u32 flags)
{ … }
static const struct media_entity_operations fimc_lite_subdev_media_ops = …;
static int fimc_lite_subdev_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static struct v4l2_mbus_framefmt *__fimc_lite_subdev_get_try_fmt(
struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, unsigned int pad)
{ … }
static int fimc_lite_subdev_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int fimc_lite_subdev_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int fimc_lite_subdev_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int fimc_lite_subdev_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int fimc_lite_subdev_s_stream(struct v4l2_subdev *sd, int on)
{ … }
static int fimc_lite_log_status(struct v4l2_subdev *sd)
{ … }
static int fimc_lite_subdev_registered(struct v4l2_subdev *sd)
{ … }
static void fimc_lite_subdev_unregistered(struct v4l2_subdev *sd)
{ … }
static const struct v4l2_subdev_internal_ops fimc_lite_subdev_internal_ops = …;
static const struct v4l2_subdev_pad_ops fimc_lite_subdev_pad_ops = …;
static const struct v4l2_subdev_video_ops fimc_lite_subdev_video_ops = …;
static const struct v4l2_subdev_core_ops fimc_lite_core_ops = …;
static const struct v4l2_subdev_ops fimc_lite_subdev_ops = …;
static int fimc_lite_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops fimc_lite_ctrl_ops = …;
static const struct v4l2_ctrl_config fimc_lite_ctrl = …;
static void fimc_lite_set_default_config(struct fimc_lite *fimc)
{ … }
static int fimc_lite_create_capture_subdev(struct fimc_lite *fimc)
{ … }
static void fimc_lite_unregister_capture_subdev(struct fimc_lite *fimc)
{ … }
static void fimc_lite_clk_put(struct fimc_lite *fimc)
{ … }
static int fimc_lite_clk_get(struct fimc_lite *fimc)
{ … }
static const struct of_device_id flite_of_match[];
static int fimc_lite_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int fimc_lite_runtime_resume(struct device *dev)
{ … }
static int fimc_lite_runtime_suspend(struct device *dev)
{ … }
#endif
#ifdef CONFIG_PM_SLEEP
static int fimc_lite_resume(struct device *dev)
{ … }
static int fimc_lite_suspend(struct device *dev)
{ … }
#endif
static void fimc_lite_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops fimc_lite_pm_ops = …;
static struct flite_drvdata fimc_lite_drvdata_exynos4 = …;
static struct flite_drvdata fimc_lite_drvdata_exynos5 = …;
static const struct of_device_id flite_of_match[] = …;
MODULE_DEVICE_TABLE(of, flite_of_match);
static struct platform_driver fimc_lite_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;