#ifndef ALVIUM_CSI2_H_
#define ALVIUM_CSI2_H_
#include <linux/kernel.h>
#include <linux/regulator/consumer.h>
#include <media/v4l2-cci.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-subdev.h>
#define REG_BCRM_V4L2 …
#define REG_BCRM_V4L2_8BIT(n) …
#define REG_BCRM_V4L2_16BIT(n) …
#define REG_BCRM_V4L2_32BIT(n) …
#define REG_BCRM_V4L2_64BIT(n) …
#define REG_BCRM_MINOR_VERSION_R …
#define REG_BCRM_MAJOR_VERSION_R …
#define REG_BCRM_REG_ADDR_R …
#define REG_BCRM_FEATURE_INQUIRY_R …
#define REG_BCRM_DEVICE_FW …
#define REG_BCRM_WRITE_HANDSHAKE_RW …
#define REG_BCRM_SUPPORTED_CSI2_LANE_COUNTS_R …
#define REG_BCRM_CSI2_LANE_COUNT_RW …
#define REG_BCRM_CSI2_CLOCK_MIN_R …
#define REG_BCRM_CSI2_CLOCK_MAX_R …
#define REG_BCRM_CSI2_CLOCK_RW …
#define REG_BCRM_BUFFER_SIZE_R …
#define REG_BCRM_IPU_X_MIN_W …
#define REG_BCRM_IPU_X_MAX_W …
#define REG_BCRM_IPU_X_INC_W …
#define REG_BCRM_IPU_Y_MIN_W …
#define REG_BCRM_IPU_Y_MAX_W …
#define REG_BCRM_IPU_Y_INC_W …
#define REG_BCRM_IPU_X_R …
#define REG_BCRM_IPU_Y_R …
#define REG_BCRM_PHY_RESET_RW …
#define REG_BCRM_LP2HS_DELAY_RW …
#define REG_BCRM_ACQUISITION_START_RW …
#define REG_BCRM_ACQUISITION_STOP_RW …
#define REG_BCRM_ACQUISITION_ABORT_RW …
#define REG_BCRM_ACQUISITION_STATUS_R …
#define REG_BCRM_ACQUISITION_FRAME_RATE_RW …
#define REG_BCRM_ACQUISITION_FRAME_RATE_MIN_R …
#define REG_BCRM_ACQUISITION_FRAME_RATE_MAX_R …
#define REG_BCRM_ACQUISITION_FRAME_RATE_INC_R …
#define REG_BCRM_ACQUISITION_FRAME_RATE_EN_RW …
#define REG_BCRM_FRAME_START_TRIGGER_MODE_RW …
#define REG_BCRM_FRAME_START_TRIGGER_SOURCE_RW …
#define REG_BCRM_FRAME_START_TRIGGER_ACTIVATION_RW …
#define REG_BCRM_FRAME_START_TRIGGER_SOFTWARE_W …
#define REG_BCRM_FRAME_START_TRIGGER_DELAY_RW …
#define REG_BCRM_EXPOSURE_ACTIVE_LINE_MODE_RW …
#define REG_BCRM_EXPOSURE_ACTIVE_LINE_SELECTOR_RW …
#define REG_BCRM_LINE_CONFIGURATION_RW …
#define REG_BCRM_IMG_WIDTH_RW …
#define REG_BCRM_IMG_WIDTH_MIN_R …
#define REG_BCRM_IMG_WIDTH_MAX_R …
#define REG_BCRM_IMG_WIDTH_INC_R …
#define REG_BCRM_IMG_HEIGHT_RW …
#define REG_BCRM_IMG_HEIGHT_MIN_R …
#define REG_BCRM_IMG_HEIGHT_MAX_R …
#define REG_BCRM_IMG_HEIGHT_INC_R …
#define REG_BCRM_IMG_OFFSET_X_RW …
#define REG_BCRM_IMG_OFFSET_X_MIN_R …
#define REG_BCRM_IMG_OFFSET_X_MAX_R …
#define REG_BCRM_IMG_OFFSET_X_INC_R …
#define REG_BCRM_IMG_OFFSET_Y_RW …
#define REG_BCRM_IMG_OFFSET_Y_MIN_R …
#define REG_BCRM_IMG_OFFSET_Y_MAX_R …
#define REG_BCRM_IMG_OFFSET_Y_INC_R …
#define REG_BCRM_IMG_MIPI_DATA_FORMAT_RW …
#define REG_BCRM_IMG_AVAILABLE_MIPI_DATA_FORMATS_R …
#define REG_BCRM_IMG_BAYER_PATTERN_INQUIRY_R …
#define REG_BCRM_IMG_BAYER_PATTERN_RW …
#define REG_BCRM_IMG_REVERSE_X_RW …
#define REG_BCRM_IMG_REVERSE_Y_RW …
#define REG_BCRM_SENSOR_WIDTH_R …
#define REG_BCRM_SENSOR_HEIGHT_R …
#define REG_BCRM_WIDTH_MAX_R …
#define REG_BCRM_HEIGHT_MAX_R …
#define REG_BCRM_EXPOSURE_TIME_RW …
#define REG_BCRM_EXPOSURE_TIME_MIN_R …
#define REG_BCRM_EXPOSURE_TIME_MAX_R …
#define REG_BCRM_EXPOSURE_TIME_INC_R …
#define REG_BCRM_EXPOSURE_AUTO_RW …
#define REG_BCRM_INTENSITY_AUTO_PRECEDENCE_RW …
#define REG_BCRM_INTENSITY_AUTO_PRECEDENCE_VALUE_RW …
#define REG_BCRM_INTENSITY_AUTO_PRECEDENCE_MIN_R …
#define REG_BCRM_INTENSITY_AUTO_PRECEDENCE_MAX_R …
#define REG_BCRM_INTENSITY_AUTO_PRECEDENCE_INC_R …
#define REG_BCRM_BLACK_LEVEL_RW …
#define REG_BCRM_BLACK_LEVEL_MIN_R …
#define REG_BCRM_BLACK_LEVEL_MAX_R …
#define REG_BCRM_BLACK_LEVEL_INC_R …
#define REG_BCRM_GAIN_RW …
#define REG_BCRM_GAIN_MIN_R …
#define REG_BCRM_GAIN_MAX_R …
#define REG_BCRM_GAIN_INC_R …
#define REG_BCRM_GAIN_AUTO_RW …
#define REG_BCRM_GAMMA_RW …
#define REG_BCRM_GAMMA_MIN_R …
#define REG_BCRM_GAMMA_MAX_R …
#define REG_BCRM_GAMMA_INC_R …
#define REG_BCRM_CONTRAST_VALUE_RW …
#define REG_BCRM_CONTRAST_VALUE_MIN_R …
#define REG_BCRM_CONTRAST_VALUE_MAX_R …
#define REG_BCRM_CONTRAST_VALUE_INC_R …
#define REG_BCRM_SATURATION_RW …
#define REG_BCRM_SATURATION_MIN_R …
#define REG_BCRM_SATURATION_MAX_R …
#define REG_BCRM_SATURATION_INC_R …
#define REG_BCRM_HUE_RW …
#define REG_BCRM_HUE_MIN_R …
#define REG_BCRM_HUE_MAX_R …
#define REG_BCRM_HUE_INC_R …
#define REG_BCRM_ALL_BALANCE_RATIO_RW …
#define REG_BCRM_ALL_BALANCE_RATIO_MIN_R …
#define REG_BCRM_ALL_BALANCE_RATIO_MAX_R …
#define REG_BCRM_ALL_BALANCE_RATIO_INC_R …
#define REG_BCRM_RED_BALANCE_RATIO_RW …
#define REG_BCRM_RED_BALANCE_RATIO_MIN_R …
#define REG_BCRM_RED_BALANCE_RATIO_MAX_R …
#define REG_BCRM_RED_BALANCE_RATIO_INC_R …
#define REG_BCRM_GREEN_BALANCE_RATIO_RW …
#define REG_BCRM_GREEN_BALANCE_RATIO_MIN_R …
#define REG_BCRM_GREEN_BALANCE_RATIO_MAX_R …
#define REG_BCRM_GREEN_BALANCE_RATIO_INC_R …
#define REG_BCRM_BLUE_BALANCE_RATIO_RW …
#define REG_BCRM_BLUE_BALANCE_RATIO_MIN_R …
#define REG_BCRM_BLUE_BALANCE_RATIO_MAX_R …
#define REG_BCRM_BLUE_BALANCE_RATIO_INC_R …
#define REG_BCRM_WHITE_BALANCE_AUTO_RW …
#define REG_BCRM_SHARPNESS_RW …
#define REG_BCRM_SHARPNESS_MIN_R …
#define REG_BCRM_SHARPNESS_MAX_R …
#define REG_BCRM_SHARPNESS_INC_R …
#define REG_BCRM_DEVICE_TEMPERATURE_R …
#define REG_BCRM_EXPOSURE_AUTO_MIN_RW …
#define REG_BCRM_EXPOSURE_AUTO_MAX_RW …
#define REG_BCRM_GAIN_AUTO_MIN_RW …
#define REG_BCRM_GAIN_AUTO_MAX_RW …
#define REG_BCRM_HEARTBEAT_RW …
#define REG_GENCP_CHANGEMODE_W …
#define REG_GENCP_CURRENTMODE_R …
#define REG_GENCP_IN_HANDSHAKE_RW …
#define REG_GENCP_OUT_SIZE_W …
#define REG_GENCP_IN_SIZE_R …
#define REG_BCRM_HANDSHAKE_STATUS_MASK …
#define REG_BCRM_HANDSHAKE_AVAILABLE_MASK …
#define BCRM_HANDSHAKE_W_DONE_EN_BIT …
#define ALVIUM_DEFAULT_FR_HZ …
#define ALVIUM_DEFAULT_PIXEL_RATE_MHZ …
#define ALVIUM_LP2HS_DELAY_MS …
#define BCRM_DEVICE_FW_MAJOR_MASK …
#define BCRM_DEVICE_FW_MAJOR_SHIFT …
#define BCRM_DEVICE_FW_MINOR_MASK …
#define BCRM_DEVICE_FW_MINOR_SHIFT …
#define BCRM_DEVICE_FW_PATCH_MASK …
#define BCRM_DEVICE_FW_PATCH_SHIFT …
#define BCRM_DEVICE_FW_SPEC_MASK …
#define BCRM_DEVICE_FW_SPEC_SHIFT …
enum alvium_bcrm_mode { … };
enum alvium_mipi_fmt { … };
enum alvium_av_bayer_bit { … };
enum alvium_av_mipi_bit { … };
struct alvium_avail_feat { … };
struct alvium_avail_mipi_fmt { … };
struct alvium_avail_bayer { … };
struct alvium_mode { … };
struct alvium_pixfmt { … };
struct alvium_ctrls { … };
struct alvium_dev { … };
static inline struct alvium_dev *sd_to_alvium(struct v4l2_subdev *sd)
{ … }
static inline struct v4l2_subdev *ctrl_to_sd(struct v4l2_ctrl *ctrl)
{ … }
#endif