#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/of_graph.h>
#include <linux/platform_device.h>
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-mc.h>
#include <media/v4l2-subdev.h>
#include "imx-media.h"
#define CSI2_SINK_PAD …
#define CSI2_NUM_SINK_PADS …
#define CSI2_NUM_SRC_PADS …
#define CSI2_NUM_PADS …
#define CSI2_DEFAULT_MAX_MBPS …
struct csi2_dev { … };
#define DEVICE_NAME …
#define CSI2_VERSION …
#define CSI2_N_LANES …
#define CSI2_PHY_SHUTDOWNZ …
#define CSI2_DPHY_RSTZ …
#define CSI2_RESETN …
#define CSI2_PHY_STATE …
#define PHY_STOPSTATEDATA_BIT …
#define PHY_STOPSTATEDATA(n) …
#define PHY_RXCLKACTIVEHS …
#define PHY_RXULPSCLKNOT …
#define PHY_STOPSTATECLK …
#define CSI2_DATA_IDS_1 …
#define CSI2_DATA_IDS_2 …
#define CSI2_ERR1 …
#define CSI2_ERR2 …
#define CSI2_MSK1 …
#define CSI2_MSK2 …
#define CSI2_PHY_TST_CTRL0 …
#define PHY_TESTCLR …
#define PHY_TESTCLK …
#define CSI2_PHY_TST_CTRL1 …
#define PHY_TESTEN …
#define CSI2IPU_GASKET …
#define CSI2IPU_YUV422_YUYV …
static inline struct csi2_dev *sd_to_dev(struct v4l2_subdev *sdev)
{ … }
static inline struct csi2_dev *notifier_to_dev(struct v4l2_async_notifier *n)
{ … }
static void csi2_enable(struct csi2_dev *csi2, bool enable)
{ … }
static void csi2_set_lanes(struct csi2_dev *csi2, unsigned int lanes)
{ … }
static void dw_mipi_csi2_phy_write(struct csi2_dev *csi2,
u32 test_code, u32 test_data)
{ … }
static const struct { … } hsfreq_map[] = …;
static int max_mbps_to_hsfreqrange_sel(u32 max_mbps)
{ … }
static int csi2_dphy_init(struct csi2_dev *csi2)
{ … }
static int __maybe_unused csi2_dphy_wait_ulp(struct csi2_dev *csi2)
{ … }
static void csi2_dphy_wait_stopstate(struct csi2_dev *csi2, unsigned int lanes)
{ … }
static int csi2_dphy_wait_clock_lane(struct csi2_dev *csi2)
{ … }
static void csi2ipu_gasket_init(struct csi2_dev *csi2)
{ … }
static int csi2_get_active_lanes(struct csi2_dev *csi2, unsigned int *lanes)
{ … }
static int csi2_start(struct csi2_dev *csi2)
{ … }
static void csi2_stop(struct csi2_dev *csi2)
{ … }
static int csi2_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int csi2_link_setup(struct media_entity *entity,
const struct media_pad *local,
const struct media_pad *remote, u32 flags)
{ … }
static struct v4l2_mbus_framefmt *
__csi2_get_fmt(struct csi2_dev *csi2, struct v4l2_subdev_state *sd_state,
unsigned int pad, enum v4l2_subdev_format_whence which)
{ … }
static int csi2_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *sdformat)
{ … }
static int csi2_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *sdformat)
{ … }
static int csi2_registered(struct v4l2_subdev *sd)
{ … }
static int csi2_log_status(struct v4l2_subdev *sd)
{ … }
static const struct v4l2_subdev_core_ops csi2_core_ops = …;
static const struct media_entity_operations csi2_entity_ops = …;
static const struct v4l2_subdev_video_ops csi2_video_ops = …;
static const struct v4l2_subdev_pad_ops csi2_pad_ops = …;
static const struct v4l2_subdev_ops csi2_subdev_ops = …;
static const struct v4l2_subdev_internal_ops csi2_internal_ops = …;
static int csi2_notify_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *sd,
struct v4l2_async_connection *asd)
{ … }
static void csi2_notify_unbind(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *sd,
struct v4l2_async_connection *asd)
{ … }
static const struct v4l2_async_notifier_operations csi2_notify_ops = …;
static int csi2_async_register(struct csi2_dev *csi2)
{ … }
static int csi2_probe(struct platform_device *pdev)
{ … }
static void csi2_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id csi2_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, csi2_dt_ids);
static struct platform_driver csi2_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;