msm: camera: uapi: Support for UAPI_HEADER_TEST config
Aligns the uapi header types and includes to be in-line with upstream kernel formatting. The errors are given by enabling the UAPI_HEADER_TEST config, which is now enabled in GKI builds. CRs-Fixed: 2679250 Change-Id: I195fb2aab9251043fc63d79dd31f2db53b1228f5 Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <media/cam_defs.h>
|
||||
#include <camera/media/cam_defs.h>
|
||||
|
||||
#define CAM_SENSOR_PROBE_CMD (CAM_COMMON_OPCODE_MAX + 1)
|
||||
#define CAM_FLASH_MAX_LED_TRIGGERS 2
|
||||
@@ -30,16 +30,16 @@
|
||||
*
|
||||
*/
|
||||
struct cam_sensor_query_cap {
|
||||
uint32_t slot_info;
|
||||
uint32_t secure_camera;
|
||||
uint32_t pos_pitch;
|
||||
uint32_t pos_roll;
|
||||
uint32_t pos_yaw;
|
||||
uint32_t actuator_slot_id;
|
||||
uint32_t eeprom_slot_id;
|
||||
uint32_t ois_slot_id;
|
||||
uint32_t flash_slot_id;
|
||||
uint32_t csiphy_slot_id;
|
||||
__u32 slot_info;
|
||||
__u32 secure_camera;
|
||||
__u32 pos_pitch;
|
||||
__u32 pos_roll;
|
||||
__u32 pos_yaw;
|
||||
__u32 actuator_slot_id;
|
||||
__u32 eeprom_slot_id;
|
||||
__u32 ois_slot_id;
|
||||
__u32 flash_slot_id;
|
||||
__u32 csiphy_slot_id;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -52,10 +52,10 @@ struct cam_sensor_query_cap {
|
||||
* @reserved
|
||||
*/
|
||||
struct cam_csiphy_query_cap {
|
||||
uint32_t slot_info;
|
||||
uint32_t version;
|
||||
uint32_t clk_lane;
|
||||
uint32_t reserved;
|
||||
__u32 slot_info;
|
||||
__u32 version;
|
||||
__u32 clk_lane;
|
||||
__u32 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -65,8 +65,8 @@ struct cam_csiphy_query_cap {
|
||||
* @reserved
|
||||
*/
|
||||
struct cam_actuator_query_cap {
|
||||
uint32_t slot_info;
|
||||
uint32_t reserved;
|
||||
__u32 slot_info;
|
||||
__u32 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -76,9 +76,9 @@ struct cam_actuator_query_cap {
|
||||
* @eeprom_kernel_probe : Indicates about the kernel or userspace probe
|
||||
*/
|
||||
struct cam_eeprom_query_cap_t {
|
||||
uint32_t slot_info;
|
||||
uint16_t eeprom_kernel_probe;
|
||||
uint16_t is_multimodule_mode;
|
||||
__u32 slot_info;
|
||||
__u16 eeprom_kernel_probe;
|
||||
__u16 is_multimodule_mode;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -87,8 +87,8 @@ struct cam_eeprom_query_cap_t {
|
||||
* @slot_info : Indicates about the slotId or cell Index
|
||||
*/
|
||||
struct cam_ois_query_cap_t {
|
||||
uint32_t slot_info;
|
||||
uint16_t reserved;
|
||||
__u32 slot_info;
|
||||
__u16 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -99,10 +99,10 @@ struct cam_ois_query_cap_t {
|
||||
* @cmd_type : Explains type of command
|
||||
*/
|
||||
struct cam_cmd_i2c_info {
|
||||
uint32_t slave_addr;
|
||||
uint8_t i2c_freq_mode;
|
||||
uint8_t cmd_type;
|
||||
uint16_t reserved;
|
||||
__u32 slave_addr;
|
||||
__u8 i2c_freq_mode;
|
||||
__u8 cmd_type;
|
||||
__u16 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -114,10 +114,10 @@ struct cam_cmd_i2c_info {
|
||||
* @memory : OIS memory
|
||||
*/
|
||||
struct cam_ois_opcode {
|
||||
uint32_t prog;
|
||||
uint32_t coeff;
|
||||
uint32_t pheripheral;
|
||||
uint32_t memory;
|
||||
__u32 prog;
|
||||
__u32 coeff;
|
||||
__u32 pheripheral;
|
||||
__u32 memory;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -132,11 +132,11 @@ struct cam_ois_opcode {
|
||||
* @opcode : opcode
|
||||
*/
|
||||
struct cam_cmd_ois_info {
|
||||
uint32_t slave_addr;
|
||||
uint8_t i2c_freq_mode;
|
||||
uint8_t cmd_type;
|
||||
uint8_t ois_fw_flag;
|
||||
uint8_t is_ois_calib;
|
||||
__u32 slave_addr;
|
||||
__u8 i2c_freq_mode;
|
||||
__u8 cmd_type;
|
||||
__u8 ois_fw_flag;
|
||||
__u8 is_ois_calib;
|
||||
char ois_name[MAX_OIS_NAME_SIZE];
|
||||
struct cam_ois_opcode opcode;
|
||||
} __attribute__((packed));
|
||||
@@ -156,15 +156,15 @@ struct cam_cmd_ois_info {
|
||||
* @reserved
|
||||
*/
|
||||
struct cam_cmd_probe {
|
||||
uint8_t data_type;
|
||||
uint8_t addr_type;
|
||||
uint8_t op_code;
|
||||
uint8_t cmd_type;
|
||||
uint32_t reg_addr;
|
||||
uint32_t expected_data;
|
||||
uint32_t data_mask;
|
||||
uint16_t camera_id;
|
||||
uint16_t reserved;
|
||||
__u8 data_type;
|
||||
__u8 addr_type;
|
||||
__u8 op_code;
|
||||
__u8 cmd_type;
|
||||
__u32 reg_addr;
|
||||
__u32 expected_data;
|
||||
__u32 data_mask;
|
||||
__u16 camera_id;
|
||||
__u16 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -177,10 +177,10 @@ struct cam_cmd_probe {
|
||||
*
|
||||
*/
|
||||
struct cam_power_settings {
|
||||
uint16_t power_seq_type;
|
||||
uint16_t reserved;
|
||||
uint32_t config_val_low;
|
||||
uint32_t config_val_high;
|
||||
__u16 power_seq_type;
|
||||
__u16 reserved;
|
||||
__u32 config_val_low;
|
||||
__u32 config_val_high;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -192,10 +192,10 @@ struct cam_power_settings {
|
||||
* @power_settings : Contains power setting info
|
||||
*/
|
||||
struct cam_cmd_power {
|
||||
uint32_t count;
|
||||
uint8_t reserved;
|
||||
uint8_t cmd_type;
|
||||
uint16_t more_reserved;
|
||||
__u32 count;
|
||||
__u8 reserved;
|
||||
__u8 cmd_type;
|
||||
__u16 more_reserved;
|
||||
struct cam_power_settings power_settings[1];
|
||||
} __attribute__((packed));
|
||||
|
||||
@@ -210,11 +210,11 @@ struct cam_cmd_power {
|
||||
* @ reserved
|
||||
*/
|
||||
struct i2c_rdwr_header {
|
||||
uint32_t count;
|
||||
uint8_t op_code;
|
||||
uint8_t cmd_type;
|
||||
uint8_t data_type;
|
||||
uint8_t addr_type;
|
||||
__u32 count;
|
||||
__u8 op_code;
|
||||
__u8 cmd_type;
|
||||
__u8 data_type;
|
||||
__u8 addr_type;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -225,8 +225,8 @@ struct i2c_rdwr_header {
|
||||
*
|
||||
*/
|
||||
struct i2c_random_wr_payload {
|
||||
uint32_t reg_addr;
|
||||
uint32_t reg_data;
|
||||
__u32 reg_addr;
|
||||
__u32 reg_data;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -245,8 +245,8 @@ struct cam_cmd_i2c_random_wr {
|
||||
* @ reserved
|
||||
*/
|
||||
struct cam_cmd_read {
|
||||
uint32_t reg_data;
|
||||
uint32_t reserved;
|
||||
__u32 reg_data;
|
||||
__u32 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -256,9 +256,9 @@ struct cam_cmd_read {
|
||||
* @ data_read : I2C read command
|
||||
*/
|
||||
struct cam_cmd_i2c_continuous_wr {
|
||||
struct i2c_rdwr_header header;
|
||||
uint32_t reg_addr;
|
||||
struct cam_cmd_read data_read[1];
|
||||
struct i2c_rdwr_header header;
|
||||
__u32 reg_addr;
|
||||
struct cam_cmd_read data_read[1];
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -267,8 +267,8 @@ struct cam_cmd_i2c_continuous_wr {
|
||||
* @ data_read : I2C read command
|
||||
*/
|
||||
struct cam_cmd_i2c_random_rd {
|
||||
struct i2c_rdwr_header header;
|
||||
struct cam_cmd_read data_read[1];
|
||||
struct i2c_rdwr_header header;
|
||||
struct cam_cmd_read data_read[1];
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -278,8 +278,8 @@ struct cam_cmd_i2c_random_rd {
|
||||
*
|
||||
*/
|
||||
struct cam_cmd_i2c_continuous_rd {
|
||||
struct i2c_rdwr_header header;
|
||||
uint32_t reg_addr;
|
||||
struct i2c_rdwr_header header;
|
||||
__u32 reg_addr;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -298,15 +298,15 @@ struct cam_cmd_i2c_continuous_rd {
|
||||
*
|
||||
*/
|
||||
struct cam_cmd_conditional_wait {
|
||||
uint8_t data_type;
|
||||
uint8_t addr_type;
|
||||
uint16_t reserved;
|
||||
uint8_t op_code;
|
||||
uint8_t cmd_type;
|
||||
uint16_t timeout;
|
||||
uint32_t reg_addr;
|
||||
uint32_t reg_data;
|
||||
uint32_t data_mask;
|
||||
__u8 data_type;
|
||||
__u8 addr_type;
|
||||
__u16 reserved;
|
||||
__u8 op_code;
|
||||
__u8 cmd_type;
|
||||
__u16 timeout;
|
||||
__u32 reg_addr;
|
||||
__u32 reg_data;
|
||||
__u32 data_mask;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -316,11 +316,11 @@ struct cam_cmd_conditional_wait {
|
||||
* @cmd_type : Explains type of command
|
||||
*/
|
||||
struct cam_cmd_unconditional_wait {
|
||||
int16_t delay;
|
||||
int16_t reserved;
|
||||
uint8_t op_code;
|
||||
uint8_t cmd_type;
|
||||
uint16_t reserved1;
|
||||
__s16 delay;
|
||||
__s16 reserved;
|
||||
__u8 op_code;
|
||||
__u8 cmd_type;
|
||||
__u16 reserved1;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -337,14 +337,14 @@ struct cam_cmd_unconditional_wait {
|
||||
*
|
||||
*/
|
||||
struct cam_csiphy_info {
|
||||
uint16_t lane_mask;
|
||||
uint16_t lane_assign;
|
||||
uint8_t csiphy_3phase;
|
||||
uint8_t combo_mode;
|
||||
uint8_t lane_cnt;
|
||||
uint8_t secure_mode;
|
||||
uint64_t settle_time;
|
||||
uint64_t data_rate;
|
||||
__u16 lane_mask;
|
||||
__u16 lane_assign;
|
||||
__u8 csiphy_3phase;
|
||||
__u8 combo_mode;
|
||||
__u8 lane_cnt;
|
||||
__u8 secure_mode;
|
||||
__u64 settle_time;
|
||||
__u64 data_rate;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -355,8 +355,8 @@ struct cam_csiphy_info {
|
||||
*
|
||||
*/
|
||||
struct cam_csiphy_acquire_dev_info {
|
||||
uint32_t combo_mode;
|
||||
uint32_t reserved;
|
||||
__u32 combo_mode;
|
||||
__u32 reserved;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -370,11 +370,11 @@ struct cam_csiphy_acquire_dev_info {
|
||||
*
|
||||
*/
|
||||
struct cam_sensor_acquire_dev {
|
||||
uint32_t session_handle;
|
||||
uint32_t device_handle;
|
||||
uint32_t handle_type;
|
||||
uint32_t reserved;
|
||||
uint64_t info_handle;
|
||||
__u32 session_handle;
|
||||
__u32 device_handle;
|
||||
__u32 handle_type;
|
||||
__u32 reserved;
|
||||
__u64 info_handle;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -387,11 +387,11 @@ struct cam_sensor_acquire_dev {
|
||||
*
|
||||
*/
|
||||
struct cam_sensor_streamon_dev {
|
||||
uint32_t session_handle;
|
||||
uint32_t device_handle;
|
||||
uint32_t handle_type;
|
||||
uint32_t reserved;
|
||||
uint64_t info_handle;
|
||||
__u32 session_handle;
|
||||
__u32 device_handle;
|
||||
__u32 handle_type;
|
||||
__u32 reserved;
|
||||
__u64 info_handle;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -401,10 +401,10 @@ struct cam_sensor_streamon_dev {
|
||||
* @cmd_type : command buffer type
|
||||
*/
|
||||
struct cam_flash_init {
|
||||
uint32_t flash_type;
|
||||
uint8_t reserved;
|
||||
uint8_t cmd_type;
|
||||
uint16_t reserved1;
|
||||
__u32 flash_type;
|
||||
__u8 reserved;
|
||||
__u8 cmd_type;
|
||||
__u16 reserved1;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -422,13 +422,13 @@ struct cam_flash_init {
|
||||
*
|
||||
*/
|
||||
struct cam_flash_set_rer {
|
||||
uint32_t count;
|
||||
uint8_t opcode;
|
||||
uint8_t cmd_type;
|
||||
uint16_t num_iteration;
|
||||
uint32_t led_on_delay_ms;
|
||||
uint32_t led_off_delay_ms;
|
||||
uint32_t led_current_ma[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
__u32 count;
|
||||
__u8 opcode;
|
||||
__u8 cmd_type;
|
||||
__u16 num_iteration;
|
||||
__u32 led_on_delay_ms;
|
||||
__u32 led_off_delay_ms;
|
||||
__u32 led_current_ma[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -445,12 +445,12 @@ struct cam_flash_set_rer {
|
||||
*
|
||||
*/
|
||||
struct cam_flash_set_on_off {
|
||||
uint32_t count;
|
||||
uint8_t opcode;
|
||||
uint8_t cmd_type;
|
||||
uint16_t reserved;
|
||||
uint32_t led_current_ma[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
uint64_t time_on_duration_ns;
|
||||
__u32 count;
|
||||
__u8 opcode;
|
||||
__u8 cmd_type;
|
||||
__u16 reserved;
|
||||
__u32 led_current_ma[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
__u64 time_on_duration_ns;
|
||||
} __attribute__((packed));
|
||||
|
||||
/**
|
||||
@@ -463,10 +463,10 @@ struct cam_flash_set_on_off {
|
||||
*
|
||||
*/
|
||||
struct cam_flash_query_curr {
|
||||
uint16_t reserved;
|
||||
uint8_t opcode;
|
||||
uint8_t cmd_type;
|
||||
uint32_t query_current_ma;
|
||||
__u16 reserved;
|
||||
__u8 opcode;
|
||||
__u8 cmd_type;
|
||||
__u32 query_current_ma;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/**
|
||||
@@ -479,10 +479,10 @@ struct cam_flash_query_curr {
|
||||
*
|
||||
*/
|
||||
struct cam_flash_query_cap_info {
|
||||
uint32_t slot_info;
|
||||
uint32_t max_current_flash[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
uint32_t max_duration_flash[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
uint32_t max_current_torch[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
__u32 slot_info;
|
||||
__u32 max_current_flash[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
__u32 max_duration_flash[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
__u32 max_current_torch[CAM_FLASH_MAX_LED_TRIGGERS];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user