#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <media/v4l2-cci.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
#define OV5693_SW_RESET_REG …
#define OV5693_SW_STREAM_REG …
#define OV5693_START_STREAMING …
#define OV5693_STOP_STREAMING …
#define OV5693_SW_RESET …
#define OV5693_REG_CHIP_ID …
#define OV5693_CHIP_ID …
#define OV5693_EXPOSURE_CTRL_REG …
#define OV5693_EXPOSURE_CTRL_MASK …
#define OV5693_INTEGRATION_TIME_MARGIN …
#define OV5693_EXPOSURE_MIN …
#define OV5693_EXPOSURE_STEP …
#define OV5693_GAIN_CTRL_REG …
#define OV5693_GAIN_CTRL_MASK …
#define OV5693_GAIN_MIN …
#define OV5693_GAIN_MAX …
#define OV5693_GAIN_DEF …
#define OV5693_GAIN_STEP …
#define OV5693_MWB_RED_GAIN_REG …
#define OV5693_MWB_GREEN_GAIN_REG …
#define OV5693_MWB_BLUE_GAIN_REG …
#define OV5693_MWB_GAIN_MASK …
#define OV5693_MWB_GAIN_MAX …
#define OV5693_DIGITAL_GAIN_MIN …
#define OV5693_DIGITAL_GAIN_MAX …
#define OV5693_DIGITAL_GAIN_DEF …
#define OV5693_DIGITAL_GAIN_STEP …
#define OV5693_CROP_START_X_REG …
#define OV5693_CROP_START_Y_REG …
#define OV5693_CROP_END_X_REG …
#define OV5693_CROP_END_Y_REG …
#define OV5693_OUTPUT_SIZE_X_REG …
#define OV5693_OUTPUT_SIZE_Y_REG …
#define OV5693_TIMING_HTS_REG …
#define OV5693_FIXED_PPL …
#define OV5693_TIMING_VTS_REG …
#define OV5693_TIMING_MAX_VTS …
#define OV5693_TIMING_MIN_VTS …
#define OV5693_OFFSET_START_X_REG …
#define OV5693_OFFSET_START_Y_REG …
#define OV5693_SUB_INC_X_REG …
#define OV5693_SUB_INC_Y_REG …
#define OV5693_FORMAT1_REG …
#define OV5693_FORMAT1_FLIP_VERT_ISP_EN …
#define OV5693_FORMAT1_FLIP_VERT_SENSOR_EN …
#define OV5693_FORMAT1_VBIN_EN …
#define OV5693_FORMAT2_REG …
#define OV5693_FORMAT2_HDR_EN …
#define OV5693_FORMAT2_FLIP_HORZ_ISP_EN …
#define OV5693_FORMAT2_FLIP_HORZ_SENSOR_EN …
#define OV5693_FORMAT2_HBIN_EN …
#define OV5693_ISP_CTRL2_REG …
#define OV5693_ISP_SCALE_ENABLE …
#define OV5693_NATIVE_WIDTH …
#define OV5693_NATIVE_HEIGHT …
#define OV5693_NATIVE_START_LEFT …
#define OV5693_NATIVE_START_TOP …
#define OV5693_ACTIVE_WIDTH …
#define OV5693_ACTIVE_HEIGHT …
#define OV5693_ACTIVE_START_LEFT …
#define OV5693_ACTIVE_START_TOP …
#define OV5693_MIN_CROP_WIDTH …
#define OV5693_MIN_CROP_HEIGHT …
#define OV5693_TEST_PATTERN_REG …
#define OV5693_TEST_PATTERN_ENABLE …
#define OV5693_TEST_PATTERN_ROLLING …
#define OV5693_TEST_PATTERN_RANDOM …
#define OV5693_TEST_PATTERN_BARS …
#define OV5693_XVCLK_FREQ …
#define OV5693_LINK_FREQ_419_2MHZ …
#define OV5693_PIXEL_RATE …
#define to_ov5693_sensor(x) …
static const char * const ov5693_supply_names[] = …;
#define OV5693_NUM_SUPPLIES …
struct ov5693_device { … };
static const struct cci_reg_sequence ov5693_global_regs[] = …;
static const struct v4l2_rect ov5693_default_crop = …;
static const struct v4l2_mbus_framefmt ov5693_default_fmt = …;
static const s64 link_freq_menu_items[] = …;
static const char * const ov5693_test_pattern_menu[] = …;
static const u8 ov5693_test_pattern_bits[] = …;
static int ov5693_flip_vert_configure(struct ov5693_device *ov5693,
bool enable)
{ … }
static int ov5693_flip_horz_configure(struct ov5693_device *ov5693,
bool enable)
{ … }
static int ov5693_get_exposure(struct ov5693_device *ov5693, s32 *value)
{ … }
static int ov5693_exposure_configure(struct ov5693_device *ov5693,
u32 exposure)
{ … }
static int ov5693_get_gain(struct ov5693_device *ov5693, u32 *gain)
{ … }
static int ov5693_digital_gain_configure(struct ov5693_device *ov5693,
u32 gain)
{ … }
static int ov5693_analog_gain_configure(struct ov5693_device *ov5693, u32 gain)
{ … }
static int ov5693_vts_configure(struct ov5693_device *ov5693, u32 vblank)
{ … }
static int ov5693_test_pattern_configure(struct ov5693_device *ov5693, u32 idx)
{ … }
static int ov5693_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int ov5693_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops ov5693_ctrl_ops = …;
static int ov5693_mode_configure(struct ov5693_device *ov5693)
{ … }
static int ov5693_enable_streaming(struct ov5693_device *ov5693, bool enable)
{ … }
static int ov5693_sw_reset(struct ov5693_device *ov5693)
{ … }
static int ov5693_sensor_init(struct ov5693_device *ov5693)
{ … }
static void ov5693_sensor_powerdown(struct ov5693_device *ov5693)
{ … }
static int ov5693_sensor_powerup(struct ov5693_device *ov5693)
{ … }
static int __maybe_unused ov5693_sensor_suspend(struct device *dev)
{ … }
static int __maybe_unused ov5693_sensor_resume(struct device *dev)
{ … }
static int ov5693_detect(struct ov5693_device *ov5693)
{ … }
static unsigned int __ov5693_calc_vts(u32 height)
{ … }
static struct v4l2_mbus_framefmt *
__ov5693_get_pad_format(struct ov5693_device *ov5693,
struct v4l2_subdev_state *state,
unsigned int pad, enum v4l2_subdev_format_whence which)
{ … }
static struct v4l2_rect *
__ov5693_get_pad_crop(struct ov5693_device *ov5693,
struct v4l2_subdev_state *state,
unsigned int pad, enum v4l2_subdev_format_whence which)
{ … }
static int ov5693_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_format *format)
{ … }
static int ov5693_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_format *format)
{ … }
static int ov5693_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_selection *sel)
{ … }
static int ov5693_set_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_selection *sel)
{ … }
static int ov5693_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int ov5693_get_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_interval *interval)
{ … }
static int ov5693_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int ov5693_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static const struct v4l2_subdev_video_ops ov5693_video_ops = …;
static const struct v4l2_subdev_pad_ops ov5693_pad_ops = …;
static const struct v4l2_subdev_ops ov5693_ops = …;
static int ov5693_init_controls(struct ov5693_device *ov5693)
{ … }
static int ov5693_configure_gpios(struct ov5693_device *ov5693)
{ … }
static int ov5693_get_regulators(struct ov5693_device *ov5693)
{ … }
static int ov5693_check_hwcfg(struct ov5693_device *ov5693)
{ … }
static int ov5693_probe(struct i2c_client *client)
{ … }
static void ov5693_remove(struct i2c_client *client)
{ … }
static const struct dev_pm_ops ov5693_pm_ops = …;
static const struct acpi_device_id ov5693_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match);
static const struct of_device_id ov5693_of_match[] = …;
MODULE_DEVICE_TABLE(of, ov5693_of_match);
static struct i2c_driver ov5693_driver = …;
module_i2c_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;