#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/slab.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
#define CSI2RX_DEVICE_CFG_REG …
#define CSI2RX_SOFT_RESET_REG …
#define CSI2RX_SOFT_RESET_PROTOCOL …
#define CSI2RX_SOFT_RESET_FRONT …
#define CSI2RX_STATIC_CFG_REG …
#define CSI2RX_STATIC_CFG_DLANE_MAP(llane, plane) …
#define CSI2RX_STATIC_CFG_LANES_MASK …
#define CSI2RX_DPHY_LANE_CTRL_REG …
#define CSI2RX_DPHY_CL_RST …
#define CSI2RX_DPHY_DL_RST(i) …
#define CSI2RX_DPHY_CL_EN …
#define CSI2RX_DPHY_DL_EN(i) …
#define CSI2RX_STREAM_BASE(n) …
#define CSI2RX_STREAM_CTRL_REG(n) …
#define CSI2RX_STREAM_CTRL_SOFT_RST …
#define CSI2RX_STREAM_CTRL_STOP …
#define CSI2RX_STREAM_CTRL_START …
#define CSI2RX_STREAM_STATUS_REG(n) …
#define CSI2RX_STREAM_STATUS_RDY …
#define CSI2RX_STREAM_DATA_CFG_REG(n) …
#define CSI2RX_STREAM_DATA_CFG_VC_SELECT(n) …
#define CSI2RX_STREAM_CFG_REG(n) …
#define CSI2RX_STREAM_CFG_FIFO_MODE_LARGE_BUF …
#define CSI2RX_LANES_MAX …
#define CSI2RX_STREAMS_MAX …
enum csi2rx_pads { … };
struct csi2rx_fmt { … };
struct csi2rx_priv { … };
static const struct csi2rx_fmt formats[] = …;
static const struct csi2rx_fmt *csi2rx_get_fmt_by_code(u32 code)
{ … }
static inline
struct csi2rx_priv *v4l2_subdev_to_csi2rx(struct v4l2_subdev *subdev)
{ … }
static void csi2rx_reset(struct csi2rx_priv *csi2rx)
{ … }
static int csi2rx_configure_ext_dphy(struct csi2rx_priv *csi2rx)
{ … }
static int csi2rx_start(struct csi2rx_priv *csi2rx)
{ … }
static void csi2rx_stop(struct csi2rx_priv *csi2rx)
{ … }
static int csi2rx_s_stream(struct v4l2_subdev *subdev, int enable)
{ … }
static int csi2rx_enum_mbus_code(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *state,
struct v4l2_subdev_mbus_code_enum *code_enum)
{ … }
static int csi2rx_set_fmt(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *state,
struct v4l2_subdev_format *format)
{ … }
static int csi2rx_init_state(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *state)
{ … }
static const struct v4l2_subdev_pad_ops csi2rx_pad_ops = …;
static const struct v4l2_subdev_video_ops csi2rx_video_ops = …;
static const struct v4l2_subdev_ops csi2rx_subdev_ops = …;
static const struct v4l2_subdev_internal_ops csi2rx_internal_ops = …;
static const struct media_entity_operations csi2rx_media_ops = …;
static int csi2rx_async_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *s_subdev,
struct v4l2_async_connection *asd)
{ … }
static const struct v4l2_async_notifier_operations csi2rx_notifier_ops = …;
static int csi2rx_get_resources(struct csi2rx_priv *csi2rx,
struct platform_device *pdev)
{ … }
static int csi2rx_parse_dt(struct csi2rx_priv *csi2rx)
{ … }
static int csi2rx_probe(struct platform_device *pdev)
{ … }
static void csi2rx_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id csi2rx_of_table[] = …;
MODULE_DEVICE_TABLE(of, csi2rx_of_table);
static struct platform_driver csi2rx_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;