#include <linux/clk.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/videodev2.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
#define CSI2DC_GCFG …
#define CSI2DC_GCFG_MIPIFRN …
#define CSI2DC_GCFG_GPIOSEL …
#define CSI2DC_GCFG_HLC(v) …
#define CSI2DC_GCFG_HLC_MASK …
#define SAMA7G5_HLC …
#define CSI2DC_GCTLR …
#define CSI2DC_GCTLR_SWRST …
#define CSI2DC_GS …
#define CSI2DC_SSPIS …
#define CSI2DC_PU …
#define CSI2DC_PU_VP …
#define CSI2DC_PUS …
#define CSI2DC_VPISR …
#define CSI2DC_VPE …
#define CSI2DC_VPE_ENABLE …
#define CSI2DC_VPCFG …
#define CSI2DC_VPCFG_DT(v) …
#define CSI2DC_VPCFG_DT_MASK …
#define CSI2DC_VPCFG_VC(v) …
#define CSI2DC_VPCFG_VC_MASK …
#define CSI2DC_VPCFG_DE …
#define CSI2DC_VPCFG_DM(v) …
#define CSI2DC_VPCFG_DM_DECODER8TO12 …
#define CSI2DC_VPCFG_DP2 …
#define CSI2DC_VPCFG_RMS …
#define CSI2DC_VPCFG_PA …
#define CSI2DC_VPCOL …
#define CSI2DC_VPCOL_COL(v) …
#define CSI2DC_VPCOL_COL_MASK …
#define CSI2DC_VPROW …
#define CSI2DC_VPROW_ROW(v) …
#define CSI2DC_VPROW_ROW_MASK …
#define CSI2DC_VERSION …
#define csi2dc_readl(st, reg) …
#define csi2dc_writel(st, reg, val) …
#define CSI2DC_DT_RAW6 …
#define CSI2DC_DT_RAW7 …
#define CSI2DC_DT_RAW8 …
#define CSI2DC_DT_RAW10 …
#define CSI2DC_DT_RAW12 …
#define CSI2DC_DT_RAW14 …
#define CSI2DC_DT_YUV422_8B …
struct csi2dc_format { … };
static const struct csi2dc_format csi2dc_formats[] = …;
enum mipi_csi_pads { … };
struct csi2dc_device { … };
static inline struct csi2dc_device *
csi2dc_sd_to_csi2dc_device(struct v4l2_subdev *csi2dc_sd)
{ … }
static int csi2dc_enum_mbus_code(struct v4l2_subdev *csi2dc_sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int csi2dc_get_fmt(struct v4l2_subdev *csi2dc_sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *format)
{ … }
static int csi2dc_set_fmt(struct v4l2_subdev *csi2dc_sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *req_fmt)
{ … }
static int csi2dc_power(struct csi2dc_device *csi2dc, int on)
{ … }
static int csi2dc_get_mbus_config(struct csi2dc_device *csi2dc)
{ … }
static void csi2dc_vp_update(struct csi2dc_device *csi2dc)
{ … }
static int csi2dc_s_stream(struct v4l2_subdev *csi2dc_sd, int enable)
{ … }
static int csi2dc_init_state(struct v4l2_subdev *csi2dc_sd,
struct v4l2_subdev_state *sd_state)
{ … }
static const struct media_entity_operations csi2dc_entity_ops = …;
static const struct v4l2_subdev_pad_ops csi2dc_pad_ops = …;
static const struct v4l2_subdev_video_ops csi2dc_video_ops = …;
static const struct v4l2_subdev_ops csi2dc_subdev_ops = …;
static const struct v4l2_subdev_internal_ops csi2dc_internal_ops = …;
static int csi2dc_async_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *subdev,
struct v4l2_async_connection *asd)
{ … }
static const struct v4l2_async_notifier_operations csi2dc_async_ops = …;
static int csi2dc_prepare_notifier(struct csi2dc_device *csi2dc,
struct fwnode_handle *input_fwnode)
{ … }
static int csi2dc_of_parse(struct csi2dc_device *csi2dc,
struct device_node *of_node)
{ … }
static void csi2dc_default_format(struct csi2dc_device *csi2dc)
{ … }
static int csi2dc_probe(struct platform_device *pdev)
{ … }
static void csi2dc_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused csi2dc_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused csi2dc_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops csi2dc_dev_pm_ops = …;
static const struct of_device_id csi2dc_of_match[] = …;
MODULE_DEVICE_TABLE(of, csi2dc_of_match);
static struct platform_driver csi2dc_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;