#include <linux/clk.h>
#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <media/v4l2-cci.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
#define IMX415_PIXEL_ARRAY_TOP …
#define IMX415_PIXEL_ARRAY_LEFT …
#define IMX415_PIXEL_ARRAY_WIDTH …
#define IMX415_PIXEL_ARRAY_HEIGHT …
#define IMX415_PIXEL_ARRAY_VBLANK …
#define IMX415_NUM_CLK_PARAM_REGS …
#define IMX415_MODE …
#define IMX415_MODE_OPERATING …
#define IMX415_MODE_STANDBY …
#define IMX415_REGHOLD …
#define IMX415_REGHOLD_INVALID …
#define IMX415_REGHOLD_VALID …
#define IMX415_XMSTA …
#define IMX415_XMSTA_START …
#define IMX415_XMSTA_STOP …
#define IMX415_BCWAIT_TIME …
#define IMX415_CPWAIT_TIME …
#define IMX415_WINMODE …
#define IMX415_ADDMODE …
#define IMX415_REVERSE …
#define IMX415_HREVERSE_SHIFT …
#define IMX415_VREVERSE_SHIFT …
#define IMX415_ADBIT …
#define IMX415_MDBIT …
#define IMX415_SYS_MODE …
#define IMX415_OUTSEL …
#define IMX415_DRV …
#define IMX415_VMAX …
#define IMX415_HMAX …
#define IMX415_SHR0 …
#define IMX415_GAIN_PCG_0 …
#define IMX415_AGAIN_MIN …
#define IMX415_AGAIN_MAX …
#define IMX415_AGAIN_STEP …
#define IMX415_BLKLEVEL …
#define IMX415_BLKLEVEL_DEFAULT …
#define IMX415_TPG_EN_DUOUT …
#define IMX415_TPG_PATSEL_DUOUT …
#define IMX415_TPG_COLORWIDTH …
#define IMX415_TESTCLKEN_MIPI …
#define IMX415_INCKSEL1 …
#define IMX415_INCKSEL2 …
#define IMX415_INCKSEL3 …
#define IMX415_INCKSEL4 …
#define IMX415_INCKSEL5 …
#define IMX415_DIG_CLP_MODE …
#define IMX415_WRJ_OPEN …
#define IMX415_SENSOR_INFO …
#define IMX415_SENSOR_INFO_MASK …
#define IMX415_CHIP_ID …
#define IMX415_LANEMODE …
#define IMX415_LANEMODE_2 …
#define IMX415_LANEMODE_4 …
#define IMX415_TXCLKESC_FREQ …
#define IMX415_INCKSEL6 …
#define IMX415_TCLKPOST …
#define IMX415_TCLKPREPARE …
#define IMX415_TCLKTRAIL …
#define IMX415_TCLKZERO …
#define IMX415_THSPREPARE …
#define IMX415_THSZERO …
#define IMX415_THSTRAIL …
#define IMX415_THSEXIT …
#define IMX415_TLPX …
#define IMX415_INCKSEL7 …
static const char *const imx415_supply_names[] = …;
static const s64 link_freq_menu_items[] = …;
struct imx415_clk_params { … };
static const struct imx415_clk_params imx415_clk_params[] = …;
static const struct cci_reg_sequence imx415_mode_2_720[] = …;
static const struct cci_reg_sequence imx415_mode_2_1440[] = …;
static const struct cci_reg_sequence imx415_mode_4_891[] = …;
struct imx415_mode_reg_list { … };
struct imx415_mode { … };
static const struct imx415_mode supported_modes[] = …;
static const char *const imx415_test_pattern_menu[] = …;
struct imx415 { … };
static const struct cci_reg_sequence imx415_init_table[] = …;
static inline struct imx415 *to_imx415(struct v4l2_subdev *sd)
{ … }
static int imx415_set_testpattern(struct imx415 *sensor, int val)
{ … }
static int imx415_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops imx415_ctrl_ops = …;
static int imx415_ctrls_init(struct imx415 *sensor)
{ … }
static int imx415_set_mode(struct imx415 *sensor, int mode)
{ … }
static int imx415_setup(struct imx415 *sensor, struct v4l2_subdev_state *state)
{ … }
static int imx415_wakeup(struct imx415 *sensor)
{ … }
static int imx415_stream_on(struct imx415 *sensor)
{ … }
static int imx415_stream_off(struct imx415 *sensor)
{ … }
static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int imx415_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int imx415_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static int imx415_set_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_format *fmt)
{ … }
static int imx415_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int imx415_init_state(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state)
{ … }
static const struct v4l2_subdev_video_ops imx415_subdev_video_ops = …;
static const struct v4l2_subdev_pad_ops imx415_subdev_pad_ops = …;
static const struct v4l2_subdev_ops imx415_subdev_ops = …;
static const struct v4l2_subdev_internal_ops imx415_internal_ops = …;
static int imx415_subdev_init(struct imx415 *sensor)
{ … }
static void imx415_subdev_cleanup(struct imx415 *sensor)
{ … }
static int imx415_power_on(struct imx415 *sensor)
{ … }
static void imx415_power_off(struct imx415 *sensor)
{ … }
static int imx415_identify_model(struct imx415 *sensor)
{ … }
static int imx415_check_inck(unsigned long inck, u64 link_frequency)
{ … }
static int imx415_parse_hw_config(struct imx415 *sensor)
{ … }
static int imx415_probe(struct i2c_client *client)
{ … }
static void imx415_remove(struct i2c_client *client)
{ … }
static int imx415_runtime_resume(struct device *dev)
{ … }
static int imx415_runtime_suspend(struct device *dev)
{ … }
static DEFINE_RUNTIME_DEV_PM_OPS(imx415_pm_ops, imx415_runtime_suspend,
imx415_runtime_resume, NULL);
static const struct of_device_id imx415_of_match[] = …;
MODULE_DEVICE_TABLE(of, imx415_of_match);
static struct i2c_driver imx415_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;