linux/drivers/media/i2c/hi556.c

// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2019 Intel Corporation.

#include <asm/unaligned.h>
#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 <linux/regulator/consumer.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>

#define HI556_REG_VALUE_08BIT
#define HI556_REG_VALUE_16BIT
#define HI556_REG_VALUE_24BIT

#define HI556_LINK_FREQ_437MHZ
#define HI556_MCLK
#define HI556_DATA_LANES
#define HI556_RGB_DEPTH

#define HI556_REG_CHIP_ID
#define HI556_CHIP_ID

#define HI556_REG_MODE_SELECT
#define HI556_MODE_STANDBY
#define HI556_MODE_STREAMING

/* vertical-timings from sensor */
#define HI556_REG_FLL
#define HI556_FLL_30FPS
#define HI556_FLL_30FPS_MIN
#define HI556_FLL_MAX

/* horizontal-timings from sensor */
#define HI556_REG_LLP

/* Exposure controls from sensor */
#define HI556_REG_EXPOSURE
#define HI556_EXPOSURE_MIN
#define HI556_EXPOSURE_MAX_MARGIN
#define HI556_EXPOSURE_STEP

/* Analog gain controls from sensor */
#define HI556_REG_ANALOG_GAIN
#define HI556_ANAL_GAIN_MIN
#define HI556_ANAL_GAIN_MAX
#define HI556_ANAL_GAIN_STEP

/* Digital gain controls from sensor */
#define HI556_REG_MWB_GR_GAIN
#define HI556_REG_MWB_GB_GAIN
#define HI556_REG_MWB_R_GAIN
#define HI556_REG_MWB_B_GAIN
#define HI556_DGTL_GAIN_MIN
#define HI556_DGTL_GAIN_MAX
#define HI556_DGTL_GAIN_STEP
#define HI556_DGTL_GAIN_DEFAULT

/* Test Pattern Control */
#define HI556_REG_ISP
#define HI556_REG_ISP_TPG_EN
#define HI556_REG_TEST_PATTERN

/* HI556 native and active pixel array size. */
#define HI556_NATIVE_WIDTH
#define HI556_NATIVE_HEIGHT
#define HI556_PIXEL_ARRAY_LEFT
#define HI556_PIXEL_ARRAY_TOP
#define HI556_PIXEL_ARRAY_WIDTH
#define HI556_PIXEL_ARRAY_HEIGHT

enum {};

struct hi556_reg {};

struct hi556_reg_list {};

struct hi556_link_freq_config {};

struct hi556_mode {};

#define to_hi556(_sd)

//SENSOR_INITIALIZATION
static const struct hi556_reg mipi_data_rate_874mbps[] =;

static const struct hi556_reg mode_2592x1944_regs[] =;

static const struct hi556_reg mode_2592x1444_regs[] =;

static const struct hi556_reg mode_1296x972_regs[] =;

static const struct hi556_reg mode_1296x722_regs[] =;

static const char * const hi556_test_pattern_menu[] =;

static const s64 link_freq_menu_items[] =;

static const struct hi556_link_freq_config link_freq_configs[] =;

static const struct hi556_mode supported_modes[] =;

struct hi556 {};

static u64 to_pixel_rate(u32 f_index)
{}

static int hi556_read_reg(struct hi556 *hi556, u16 reg, u16 len, u32 *val)
{}

static int hi556_write_reg(struct hi556 *hi556, u16 reg, u16 len, u32 val)
{}

static int hi556_write_reg_list(struct hi556 *hi556,
				const struct hi556_reg_list *r_list)
{}

static int hi556_update_digital_gain(struct hi556 *hi556, u32 d_gain)
{}

static int hi556_test_pattern(struct hi556 *hi556, u32 pattern)
{}

static int hi556_set_ctrl(struct v4l2_ctrl *ctrl)
{}

static const struct v4l2_ctrl_ops hi556_ctrl_ops =;

static int hi556_init_controls(struct hi556 *hi556)
{}

static void hi556_assign_pad_format(const struct hi556_mode *mode,
				    struct v4l2_mbus_framefmt *fmt)
{}

static int hi556_identify_module(struct hi556 *hi556)
{}

static const struct v4l2_rect *
__hi556_get_pad_crop(struct hi556 *hi556,
		     struct v4l2_subdev_state *sd_state,
		     unsigned int pad, enum v4l2_subdev_format_whence which)
{}

static int hi556_get_selection(struct v4l2_subdev *sd,
			       struct v4l2_subdev_state *sd_state,
			       struct v4l2_subdev_selection *sel)
{}

static int hi556_start_streaming(struct hi556 *hi556)
{}

static void hi556_stop_streaming(struct hi556 *hi556)
{}

static int hi556_set_stream(struct v4l2_subdev *sd, int enable)
{}

static int hi556_set_format(struct v4l2_subdev *sd,
			    struct v4l2_subdev_state *sd_state,
			    struct v4l2_subdev_format *fmt)
{}

static int hi556_get_format(struct v4l2_subdev *sd,
			    struct v4l2_subdev_state *sd_state,
			    struct v4l2_subdev_format *fmt)
{}

static int hi556_enum_mbus_code(struct v4l2_subdev *sd,
				struct v4l2_subdev_state *sd_state,
				struct v4l2_subdev_mbus_code_enum *code)
{}

static int hi556_enum_frame_size(struct v4l2_subdev *sd,
				 struct v4l2_subdev_state *sd_state,
				 struct v4l2_subdev_frame_size_enum *fse)
{}

static int hi556_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
{}

static const struct v4l2_subdev_video_ops hi556_video_ops =;

static const struct v4l2_subdev_pad_ops hi556_pad_ops =;

static const struct v4l2_subdev_ops hi556_subdev_ops =;

static const struct media_entity_operations hi556_subdev_entity_ops =;

static const struct v4l2_subdev_internal_ops hi556_internal_ops =;

static int hi556_check_hwcfg(struct device *dev)
{}

static void hi556_remove(struct i2c_client *client)
{}

static int hi556_suspend(struct device *dev)
{}

static int hi556_resume(struct device *dev)
{}

static int hi556_probe(struct i2c_client *client)
{}

static DEFINE_RUNTIME_DEV_PM_OPS(hi556_pm_ops, hi556_suspend, hi556_resume,
				 NULL);

#ifdef CONFIG_ACPI
static const struct acpi_device_id hi556_acpi_ids[] =;

MODULE_DEVICE_TABLE(acpi, hi556_acpi_ids);
#endif

static struct i2c_driver hi556_i2c_driver =;

module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();