#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.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 OV13B10_REG_VALUE_08BIT …
#define OV13B10_REG_VALUE_16BIT …
#define OV13B10_REG_VALUE_24BIT …
#define OV13B10_REG_MODE_SELECT …
#define OV13B10_MODE_STANDBY …
#define OV13B10_MODE_STREAMING …
#define OV13B10_REG_SOFTWARE_RST …
#define OV13B10_SOFTWARE_RST …
#define OV13B10_REG_CHIP_ID …
#define OV13B10_CHIP_ID …
#define OV13B10_REG_VTS …
#define OV13B10_VTS_30FPS …
#define OV13B10_VTS_60FPS …
#define OV13B10_VTS_120FPS …
#define OV13B10_VTS_MAX …
#define OV13B10_PPL_560MHZ …
#define OV13B10_REG_EXPOSURE …
#define OV13B10_EXPOSURE_MIN …
#define OV13B10_EXPOSURE_STEP …
#define OV13B10_EXPOSURE_DEFAULT …
#define OV13B10_REG_ANALOG_GAIN …
#define OV13B10_ANA_GAIN_MIN …
#define OV13B10_ANA_GAIN_MAX …
#define OV13B10_ANA_GAIN_STEP …
#define OV13B10_ANA_GAIN_DEFAULT …
#define OV13B10_REG_DGTL_GAIN_H …
#define OV13B10_REG_DGTL_GAIN_M …
#define OV13B10_REG_DGTL_GAIN_L …
#define OV13B10_DGTL_GAIN_MIN …
#define OV13B10_DGTL_GAIN_MAX …
#define OV13B10_DGTL_GAIN_DEFAULT …
#define OV13B10_DGTL_GAIN_STEP …
#define OV13B10_DGTL_GAIN_L_SHIFT …
#define OV13B10_DGTL_GAIN_L_MASK …
#define OV13B10_DGTL_GAIN_M_SHIFT …
#define OV13B10_DGTL_GAIN_M_MASK …
#define OV13B10_DGTL_GAIN_H_SHIFT …
#define OV13B10_DGTL_GAIN_H_MASK …
#define OV13B10_REG_TEST_PATTERN …
#define OV13B10_TEST_PATTERN_ENABLE …
#define OV13B10_TEST_PATTERN_MASK …
#define OV13B10_TEST_PATTERN_BAR_SHIFT …
#define OV13B10_REG_FORMAT1 …
#define OV13B10_REG_FORMAT2 …
#define OV13B10_REG_H_WIN_OFFSET …
#define OV13B10_REG_V_WIN_OFFSET …
struct ov13b10_reg { … };
struct ov13b10_reg_list { … };
struct ov13b10_link_freq_config { … };
struct ov13b10_mode { … };
static const struct ov13b10_reg mipi_data_rate_1120mbps[] = …;
static const struct ov13b10_reg mode_4208x3120_regs[] = …;
static const struct ov13b10_reg mode_4160x3120_regs[] = …;
static const struct ov13b10_reg mode_4160x2340_regs[] = …;
static const struct ov13b10_reg mode_2104x1560_regs[] = …;
static const struct ov13b10_reg mode_2080x1170_regs[] = …;
static const struct ov13b10_reg mode_1364x768_120fps_regs[] = …;
static const char * const ov13b10_test_pattern_menu[] = …;
#define OV13B10_LINK_FREQ_560MHZ …
#define OV13B10_LINK_FREQ_INDEX_0 …
#define OV13B10_EXT_CLK …
#define OV13B10_DATA_LANES …
static u64 link_freq_to_pixel_rate(u64 f)
{ … }
static const s64 link_freq_menu_items[] = …;
static const struct ov13b10_link_freq_config
link_freq_configs[] = …;
static const struct ov13b10_mode supported_modes[] = …;
struct ov13b10 { … };
#define to_ov13b10(_sd) …
static int ov13b10_read_reg(struct ov13b10 *ov13b,
u16 reg, u32 len, u32 *val)
{ … }
static int ov13b10_write_reg(struct ov13b10 *ov13b,
u16 reg, u32 len, u32 __val)
{ … }
static int ov13b10_write_regs(struct ov13b10 *ov13b,
const struct ov13b10_reg *regs, u32 len)
{ … }
static int ov13b10_write_reg_list(struct ov13b10 *ov13b,
const struct ov13b10_reg_list *r_list)
{ … }
static int ov13b10_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{ … }
static int ov13b10_update_digital_gain(struct ov13b10 *ov13b, u32 d_gain)
{ … }
static int ov13b10_enable_test_pattern(struct ov13b10 *ov13b, u32 pattern)
{ … }
static int ov13b10_set_ctrl_hflip(struct ov13b10 *ov13b, u32 ctrl_val)
{ … }
static int ov13b10_set_ctrl_vflip(struct ov13b10 *ov13b, u32 ctrl_val)
{ … }
static int ov13b10_set_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops ov13b10_ctrl_ops = …;
static int ov13b10_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int ov13b10_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static void ov13b10_update_pad_format(const struct ov13b10_mode *mode,
struct v4l2_subdev_format *fmt)
{ … }
static int ov13b10_do_get_pad_format(struct ov13b10 *ov13b,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int ov13b10_get_pad_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int
ov13b10_set_pad_format(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static int ov13b10_identify_module(struct ov13b10 *ov13b)
{ … }
static int ov13b10_power_off(struct device *dev)
{ … }
static int ov13b10_power_on(struct device *dev)
{ … }
static int ov13b10_start_streaming(struct ov13b10 *ov13b)
{ … }
static int ov13b10_stop_streaming(struct ov13b10 *ov13b)
{ … }
static int ov13b10_set_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int ov13b10_suspend(struct device *dev)
{ … }
static int ov13b10_resume(struct device *dev)
{ … }
static const struct v4l2_subdev_video_ops ov13b10_video_ops = …;
static const struct v4l2_subdev_pad_ops ov13b10_pad_ops = …;
static const struct v4l2_subdev_ops ov13b10_subdev_ops = …;
static const struct media_entity_operations ov13b10_subdev_entity_ops = …;
static const struct v4l2_subdev_internal_ops ov13b10_internal_ops = …;
static int ov13b10_init_controls(struct ov13b10 *ov13b)
{ … }
static void ov13b10_free_controls(struct ov13b10 *ov13b)
{ … }
static int ov13b10_get_pm_resources(struct device *dev)
{ … }
static int ov13b10_check_hwcfg(struct device *dev)
{ … }
static int ov13b10_probe(struct i2c_client *client)
{ … }
static void ov13b10_remove(struct i2c_client *client)
{ … }
static DEFINE_RUNTIME_DEV_PM_OPS(ov13b10_pm_ops, ov13b10_suspend,
ov13b10_resume, NULL);
#ifdef CONFIG_ACPI
static const struct acpi_device_id ov13b10_acpi_ids[] = …;
MODULE_DEVICE_TABLE(acpi, ov13b10_acpi_ids);
#endif
static struct i2c_driver ov13b10_i2c_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;