Shuzhen Wang | b4f4c92 | 2013-01-08 14:32:08 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #ifndef __CAMERA2_H__ |
| 15 | #define __CAMERA2_H__ |
| 16 | |
| 17 | #include <media/msm_cam_sensor.h> |
| 18 | #include <mach/board.h> |
| 19 | |
Sreesudhan Ramakrish Ramkumar | 6acf625 | 2013-01-26 21:26:13 -0800 | [diff] [blame] | 20 | enum msm_camera_device_type_t { |
| 21 | MSM_CAMERA_I2C_DEVICE, |
| 22 | MSM_CAMERA_PLATFORM_DEVICE, |
Shuzhen Wang | b4f4c92 | 2013-01-08 14:32:08 -0800 | [diff] [blame] | 23 | }; |
| 24 | |
| 25 | enum msm_bus_perf_setting { |
| 26 | S_INIT, |
| 27 | S_PREVIEW, |
| 28 | S_VIDEO, |
| 29 | S_CAPTURE, |
| 30 | S_ZSL, |
| 31 | S_STEREO_VIDEO, |
| 32 | S_STEREO_CAPTURE, |
| 33 | S_DEFAULT, |
| 34 | S_LIVESHOT, |
| 35 | S_DUAL, |
| 36 | S_EXIT |
| 37 | }; |
| 38 | |
Sreesudhan Ramakrish Ramkumar | 9f3aa30 | 2013-01-23 14:50:58 -0800 | [diff] [blame] | 39 | enum cci_i2c_master_t { |
| 40 | MASTER_0, |
| 41 | MASTER_1, |
| 42 | }; |
| 43 | |
Shuzhen Wang | b4f4c92 | 2013-01-08 14:32:08 -0800 | [diff] [blame] | 44 | struct msm_camera_slave_info { |
| 45 | uint16_t sensor_slave_addr; |
| 46 | uint16_t sensor_id_reg_addr; |
| 47 | uint16_t sensor_id; |
| 48 | }; |
| 49 | |
| 50 | struct msm_cam_clk_info { |
| 51 | const char *clk_name; |
| 52 | long clk_rate; |
| 53 | uint32_t delay; |
| 54 | }; |
| 55 | |
| 56 | struct msm_cam_clk_setting { |
| 57 | struct msm_cam_clk_info *clk_info; |
| 58 | uint16_t num_clk_info; |
| 59 | uint8_t enable; |
| 60 | }; |
| 61 | |
| 62 | struct v4l2_subdev_info { |
| 63 | enum v4l2_mbus_pixelcode code; |
| 64 | enum v4l2_colorspace colorspace; |
| 65 | uint16_t fmt; |
| 66 | uint16_t order; |
| 67 | }; |
| 68 | |
| 69 | struct msm_camera_sensor_board_info { |
| 70 | const char *sensor_name; |
| 71 | struct msm_camera_slave_info *slave_info; |
| 72 | struct msm_camera_csi_lane_params *csi_lane_params; |
| 73 | struct camera_vreg_t *cam_vreg; |
| 74 | int num_vreg; |
| 75 | struct msm_camera_sensor_strobe_flash_data *strobe_flash_data; |
| 76 | struct msm_camera_gpio_conf *gpio_conf; |
| 77 | struct msm_actuator_info *actuator_info; |
| 78 | struct msm_camera_i2c_conf *i2c_conf; |
| 79 | struct msm_sensor_info_t *sensor_info; |
| 80 | struct msm_sensor_init_params *sensor_init_params; |
| 81 | }; |
| 82 | |
| 83 | enum msm_camera_i2c_cmd_type { |
| 84 | MSM_CAMERA_I2C_CMD_WRITE, |
| 85 | MSM_CAMERA_I2C_CMD_POLL, |
| 86 | }; |
| 87 | |
| 88 | struct msm_camera_i2c_reg_conf { |
| 89 | uint16_t reg_addr; |
| 90 | uint16_t reg_data; |
| 91 | enum msm_camera_i2c_data_type dt; |
| 92 | enum msm_camera_i2c_cmd_type cmd_type; |
| 93 | int16_t mask; |
| 94 | }; |
| 95 | |
Rajakumar Govindaram | 6ad7287 | 2013-01-29 18:36:13 -0800 | [diff] [blame] | 96 | struct msm_camera_i2c_conf_array { |
| 97 | struct msm_camera_i2c_reg_conf *conf; |
| 98 | uint16_t size; |
| 99 | uint16_t delay; |
| 100 | enum msm_camera_i2c_data_type data_type; |
| 101 | }; |
| 102 | |
Shuzhen Wang | b4f4c92 | 2013-01-08 14:32:08 -0800 | [diff] [blame] | 103 | #endif |