#include <linux/unaligned.h>
#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
#define OV9734_LINK_FREQ_180MHZ …
#define OV9734_SCLK …
#define OV9734_MCLK …
#define OV9734_DATA_LANES …
#define OV9734_RGB_DEPTH …
#define OV9734_REG_CHIP_ID …
#define OV9734_CHIP_ID …
#define OV9734_REG_MODE_SELECT …
#define OV9734_MODE_STANDBY …
#define OV9734_MODE_STREAMING …
#define OV9734_REG_VTS …
#define OV9734_VTS_30FPS …
#define OV9734_VTS_30FPS_MIN …
#define OV9734_VTS_MAX …
#define OV9734_REG_HTS …
#define OV9734_REG_EXPOSURE …
#define OV9734_EXPOSURE_MIN …
#define OV9734_EXPOSURE_MAX_MARGIN …
#define OV9734_EXPOSURE_STEP …
#define OV9734_REG_ANALOG_GAIN …
#define OV9734_ANAL_GAIN_MIN …
#define OV9734_ANAL_GAIN_MAX …
#define OV9734_ANAL_GAIN_STEP …
#define OV9734_REG_MWB_R_GAIN …
#define OV9734_REG_MWB_G_GAIN …
#define OV9734_REG_MWB_B_GAIN …
#define OV9734_DGTL_GAIN_MIN …
#define OV9734_DGTL_GAIN_MAX …
#define OV9734_DGTL_GAIN_STEP …
#define OV9734_DGTL_GAIN_DEFAULT …
#define OV9734_REG_TEST_PATTERN …
#define OV9734_TEST_PATTERN_ENABLE …
#define OV9734_TEST_PATTERN_BAR_SHIFT …
#define OV9734_REG_GROUP_ACCESS …
#define OV9734_GROUP_HOLD_START …
#define OV9734_GROUP_HOLD_END …
#define OV9734_GROUP_HOLD_LAUNCH …
enum { … };
struct ov9734_reg { … };
struct ov9734_reg_list { … };
struct ov9734_link_freq_config { … };
struct ov9734_mode { … };
static const struct ov9734_reg mipi_data_rate_360mbps[] = …;
static const struct ov9734_reg mode_1296x734_regs[] = …;
static const char * const ov9734_test_pattern_menu[] = …;
static const s64 link_freq_menu_items[] = …;
static const struct ov9734_link_freq_config link_freq_configs[] = …;
static const struct ov9734_mode supported_modes[] = …;
struct ov9734 { … };
static inline struct ov9734 *to_ov9734(struct v4l2_subdev *subdev)
{ … }
static u64 to_pixel_rate(u32 f_index)
{ … }
static u64 to_pixels_per_line(u32 hts, u32 f_index)
{ … }
static int ov9734_read_reg(struct ov9734 *ov9734, u16 reg, u16 len, u32 *val)
{ … }
static int ov9734_write_reg(struct ov9734 *ov9734, u16 reg, u16 len, u32 val)
{ … }
static int ov9734_write_reg_list(struct ov9734 *ov9734,
const struct ov9734_reg_list *r_list)
{ … }
static int ov9734_update_digital_gain(struct ov9734 *ov9734, u32 d_gain)
{ … }
static int ov9734_test_pattern(struct ov9734 *ov9734, u32 pattern)
{ … }
static int ov9734_set_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops ov9734_ctrl_ops = …;
static int ov9734_init_controls(struct ov9734 *ov9734)
{ … }
static void ov9734_update_pad_format(const struct ov9734_mode *mode,
struct v4l2_mbus_framefmt *fmt)
{ … }
static int ov9734_start_streaming(struct ov9734 *ov9734)
{ … }
static void ov9734_stop_streaming(struct ov9734 *ov9734)
{ … }
static int ov9734_set_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int ov9734_set_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int ov9734_get_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int ov9734_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int ov9734_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static int ov9734_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{ … }
static const struct v4l2_subdev_video_ops ov9734_video_ops = …;
static const struct v4l2_subdev_pad_ops ov9734_pad_ops = …;
static const struct v4l2_subdev_ops ov9734_subdev_ops = …;
static const struct media_entity_operations ov9734_subdev_entity_ops = …;
static const struct v4l2_subdev_internal_ops ov9734_internal_ops = …;
static int ov9734_identify_module(struct ov9734 *ov9734)
{ … }
static int ov9734_check_hwcfg(struct device *dev)
{ … }
static void ov9734_remove(struct i2c_client *client)
{ … }
static int ov9734_probe(struct i2c_client *client)
{ … }
static const struct acpi_device_id ov9734_acpi_ids[] = …;
MODULE_DEVICE_TABLE(acpi, ov9734_acpi_ids);
static struct i2c_driver ov9734_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;