Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2012, Code Aurora Forum. 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 | #include <linux/i2c.h> |
| 14 | #include <linux/i2c/sx150x.h> |
| 15 | #include <linux/gpio.h> |
| 16 | #include <linux/regulator/consumer.h> |
| 17 | #include <linux/kernel.h> |
| 18 | #include <linux/platform_device.h> |
| 19 | #include <asm/mach-types.h> |
| 20 | #include <mach/msm_iomap.h> |
| 21 | #include <mach/board.h> |
| 22 | #include <mach/irqs-7xxx.h> |
| 23 | #include "devices-msm7x2xa.h" |
| 24 | #include "board-msm7627a.h" |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 25 | #include <mach/vreg.h> |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 26 | |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 27 | #define GPIO_SKU1_CAM_VGA_SHDN 18 |
| 28 | #define GPIO_SKU1_CAM_VGA_RESET_N 29 |
| 29 | #define GPIO_SKU3_CAM_5MP_SHDN_N 5 /* PWDN */ |
| 30 | #define GPIO_SKU3_CAM_5MP_CAMIF_RESET 6 /* (board_is(EVT))?123:121 RESET */ |
| 31 | #define GPIO_SKU3_CAM_5MP_CAM_DRIVER_PWDN 30 |
| 32 | |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 33 | #ifdef CONFIG_MSM_CAMERA_V4L2 |
| 34 | static uint32_t camera_off_gpio_table[] = { |
| 35 | GPIO_CFG(15, 0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), |
| 36 | }; |
| 37 | |
| 38 | static uint32_t camera_on_gpio_table[] = { |
| 39 | GPIO_CFG(15, 1, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), |
| 40 | }; |
| 41 | |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 42 | static struct gpio s5k4e1_cam_req_gpio[] = { |
| 43 | {GPIO_CAM_GP_CAMIF_RESET_N, GPIOF_DIR_OUT, "CAM_RESET"}, |
| 44 | }; |
| 45 | |
| 46 | static struct msm_gpio_set_tbl s5k4e1_cam_gpio_set_tbl[] = { |
| 47 | {GPIO_CAM_GP_CAMIF_RESET_N, GPIOF_OUT_INIT_LOW, 1000}, |
| 48 | {GPIO_CAM_GP_CAMIF_RESET_N, GPIOF_OUT_INIT_HIGH, 4000}, |
| 49 | }; |
| 50 | |
| 51 | static struct msm_camera_gpio_conf gpio_conf_s5k4e1 = { |
| 52 | .camera_off_table = camera_off_gpio_table, |
| 53 | .camera_off_table_size = ARRAY_SIZE(camera_off_gpio_table), |
| 54 | .camera_on_table = camera_on_gpio_table, |
| 55 | .camera_on_table_size = ARRAY_SIZE(camera_on_gpio_table), |
| 56 | .cam_gpio_req_tbl = s5k4e1_cam_req_gpio, |
| 57 | .cam_gpio_req_tbl_size = ARRAY_SIZE(s5k4e1_cam_req_gpio), |
| 58 | .cam_gpio_set_tbl = s5k4e1_cam_gpio_set_tbl, |
| 59 | .cam_gpio_set_tbl_size = ARRAY_SIZE(s5k4e1_cam_gpio_set_tbl), |
| 60 | .gpio_no_mux = 1, |
| 61 | }; |
| 62 | |
| 63 | static struct msm_camera_gpio_conf gpio_conf_mt9e013 = { |
| 64 | .camera_off_table = camera_off_gpio_table, |
| 65 | .camera_on_table = camera_on_gpio_table, |
| 66 | .gpio_no_mux = 1, |
| 67 | }; |
| 68 | |
| 69 | static struct msm_camera_gpio_conf gpio_conf_ov9726 = { |
| 70 | .camera_off_table = camera_off_gpio_table, |
| 71 | .camera_on_table = camera_on_gpio_table, |
| 72 | .gpio_no_mux = 1, |
| 73 | }; |
| 74 | |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 75 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
Sreesudhan Ramakrish Ramkumar | 9719a99 | 2012-04-16 15:28:05 -0700 | [diff] [blame^] | 76 | static struct gpio ov7692_cam_req_gpio[] = { |
| 77 | {GPIO_SKU1_CAM_VGA_SHDN, GPIOF_DIR_OUT, "CAM_VGA_SHDN"}, |
| 78 | {GPIO_SKU1_CAM_VGA_RESET_N, GPIOF_DIR_OUT, "CAM_VGA_RESET"}, |
| 79 | }; |
| 80 | |
| 81 | static struct msm_gpio_set_tbl ov7692_cam_gpio_set_tbl[] = { |
| 82 | {GPIO_SKU1_CAM_VGA_SHDN, GPIOF_OUT_INIT_HIGH, 5000}, |
| 83 | {GPIO_SKU1_CAM_VGA_SHDN, GPIOF_OUT_INIT_LOW, 5000}, |
| 84 | {GPIO_SKU1_CAM_VGA_RESET_N, GPIOF_OUT_INIT_HIGH, 5000}, |
| 85 | {GPIO_SKU1_CAM_VGA_RESET_N, GPIOF_OUT_INIT_LOW, 5000}, |
| 86 | {40, GPIOF_OUT_INIT_HIGH, 5000}, |
| 87 | {35, GPIOF_OUT_INIT_HIGH, 5000}, |
| 88 | }; |
| 89 | |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 90 | static struct msm_camera_gpio_conf gpio_conf_ov7692 = { |
Sreesudhan Ramakrish Ramkumar | 9719a99 | 2012-04-16 15:28:05 -0700 | [diff] [blame^] | 91 | .cam_gpio_req_tbl = ov7692_cam_req_gpio, |
| 92 | .cam_gpio_req_tbl_size = ARRAY_SIZE(ov7692_cam_req_gpio), |
| 93 | .cam_gpio_set_tbl = ov7692_cam_gpio_set_tbl, |
| 94 | .cam_gpio_set_tbl_size = ARRAY_SIZE(ov7692_cam_gpio_set_tbl), |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 95 | .gpio_no_mux = 1, |
| 96 | }; |
| 97 | #endif |
| 98 | |
| 99 | #ifdef CONFIG_OV5647 |
| 100 | static struct msm_camera_gpio_conf gpio_conf_ov5647 = { |
| 101 | .camera_off_table = camera_off_gpio_table, |
| 102 | .camera_on_table = camera_on_gpio_table, |
| 103 | .gpio_no_mux = 1, |
| 104 | }; |
| 105 | #endif |
| 106 | |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 107 | #ifdef CONFIG_MSM_CAMERA_FLASH |
| 108 | static struct msm_camera_sensor_flash_src msm_flash_src = { |
| 109 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_EXT, |
| 110 | ._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1, |
| 111 | ._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2, |
| 112 | }; |
| 113 | #endif |
| 114 | |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 115 | static struct camera_vreg_t msm_cam_vreg[] = { |
| 116 | {"msme1", REG_LDO, 1800000, 1800000, 0}, |
| 117 | {"gp2", REG_LDO, 2850000, 2850000, 0}, |
| 118 | {"usb2", REG_LDO, 1800000, 1800000, 0}, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 119 | }; |
| 120 | |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 121 | static struct msm_camera_sensor_info msm_camera_sensor_s5k4e1_data; |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 122 | |
| 123 | struct msm_camera_device_platform_data msm_camera_device_data_csi1 = { |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 124 | .csid_core = 1, |
| 125 | .is_csic = 1, |
| 126 | }; |
| 127 | |
| 128 | struct msm_camera_device_platform_data msm_camera_device_data_csi0 = { |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 129 | .csid_core = 0, |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 130 | .is_csic = 1, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 131 | }; |
| 132 | |
Rajakumar Govindaram | 6627b36 | 2012-01-29 19:00:30 -0800 | [diff] [blame] | 133 | static struct i2c_board_info msm_act_main_cam_i2c_info = { |
| 134 | I2C_BOARD_INFO("msm_actuator", 0x11), |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 135 | }; |
| 136 | |
Rajakumar Govindaram | 6627b36 | 2012-01-29 19:00:30 -0800 | [diff] [blame] | 137 | static struct msm_actuator_info msm_act_main_cam_4_info = { |
| 138 | .board_info = &msm_act_main_cam_i2c_info, |
| 139 | .cam_name = MSM_ACTUATOR_MAIN_CAM_4, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 140 | .bus_id = MSM_GSBI0_QUP_I2C_BUS_ID, |
| 141 | .vcm_pwd = GPIO_CAM_GP_CAM_PWDN, |
| 142 | .vcm_enable = 1, |
| 143 | }; |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 144 | |
| 145 | #ifdef CONFIG_S5K4E1 |
| 146 | static struct msm_camera_sensor_flash_data flash_s5k4e1 = { |
| 147 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 148 | .flash_src = &msm_flash_src |
| 149 | }; |
| 150 | |
| 151 | static struct msm_camera_sensor_platform_info sensor_board_info_s5k4e1 = { |
| 152 | .mount_angle = 90, |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 153 | .cam_vreg = msm_cam_vreg, |
| 154 | .num_vreg = ARRAY_SIZE(msm_cam_vreg), |
| 155 | .gpio_conf = &gpio_conf_s5k4e1, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 156 | }; |
| 157 | |
| 158 | static struct msm_camera_sensor_info msm_camera_sensor_s5k4e1_data = { |
| 159 | .sensor_name = "s5k4e1", |
| 160 | .sensor_reset_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 161 | .pmic_gpio_enable = 0, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 162 | .pdata = &msm_camera_device_data_csi1, |
| 163 | .flash_data = &flash_s5k4e1, |
| 164 | .sensor_platform_info = &sensor_board_info_s5k4e1, |
| 165 | .csi_if = 1, |
| 166 | .camera_type = BACK_CAMERA_2D, |
Raju P.L.S.S.S.N | 3f4b302 | 2012-03-29 10:09:01 +0530 | [diff] [blame] | 167 | .sensor_type = BAYER_SENSOR, |
Rajakumar Govindaram | 6627b36 | 2012-01-29 19:00:30 -0800 | [diff] [blame] | 168 | .actuator_info = &msm_act_main_cam_4_info, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 169 | }; |
| 170 | #endif |
| 171 | |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 172 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 173 | static struct msm_camera_sensor_platform_info sensor_board_info_ov7692 = { |
| 174 | .mount_angle = 90, |
| 175 | .cam_vreg = msm_cam_vreg, |
| 176 | .num_vreg = ARRAY_SIZE(msm_cam_vreg), |
| 177 | .gpio_conf = &gpio_conf_ov7692, |
| 178 | }; |
| 179 | |
| 180 | static struct msm_camera_sensor_flash_data flash_ov7692 = { |
| 181 | .flash_type = MSM_CAMERA_FLASH_NONE, |
| 182 | }; |
| 183 | |
| 184 | static struct msm_camera_sensor_info msm_camera_sensor_ov7692_data = { |
| 185 | .sensor_name = "ov7692", |
| 186 | .sensor_reset_enable = 0, |
| 187 | .pmic_gpio_enable = 1, |
| 188 | .sensor_reset = GPIO_SKU1_CAM_VGA_RESET_N, |
| 189 | .sensor_pwd = GPIO_SKU1_CAM_VGA_SHDN, |
| 190 | .pdata = &msm_camera_device_data_csi0, |
| 191 | .flash_data = &flash_ov7692, |
| 192 | .sensor_platform_info = &sensor_board_info_ov7692, |
| 193 | .csi_if = 1, |
| 194 | .camera_type = FRONT_CAMERA_2D, |
Raju P.L.S.S.S.N | 3f4b302 | 2012-03-29 10:09:01 +0530 | [diff] [blame] | 195 | .sensor_type = YUV_SENSOR, |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 196 | }; |
| 197 | #endif |
| 198 | |
| 199 | #ifdef CONFIG_OV5647 |
| 200 | |
Rajakumar Govindaram | 6627b36 | 2012-01-29 19:00:30 -0800 | [diff] [blame] | 201 | static struct msm_actuator_info msm_act_main_cam_5_info = { |
| 202 | .board_info = &msm_act_main_cam_i2c_info, |
| 203 | .cam_name = MSM_ACTUATOR_MAIN_CAM_5, |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 204 | .bus_id = MSM_GSBI0_QUP_I2C_BUS_ID, |
| 205 | .vcm_pwd = GPIO_SKU3_CAM_5MP_CAM_DRIVER_PWDN, |
| 206 | .vcm_enable = 1, |
| 207 | }; |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 208 | |
| 209 | static struct msm_camera_sensor_platform_info sensor_board_info_ov5647 = { |
| 210 | .mount_angle = 90, |
| 211 | .cam_vreg = msm_cam_vreg, |
| 212 | .num_vreg = ARRAY_SIZE(msm_cam_vreg), |
| 213 | .gpio_conf = &gpio_conf_ov5647, |
| 214 | }; |
| 215 | |
| 216 | static struct msm_camera_sensor_flash_src msm_flash_src_ov5647 = { |
Raju P.L.S.S.S.N | bf3faff | 2012-04-05 14:33:36 +0530 | [diff] [blame] | 217 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_LED1, |
| 218 | ._fsrc.ext_driver_src.led_en = 13, |
| 219 | ._fsrc.ext_driver_src.led_flash_en = 32, |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 220 | }; |
| 221 | |
| 222 | static struct msm_camera_sensor_flash_data flash_ov5647 = { |
| 223 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 224 | .flash_src = &msm_flash_src_ov5647, |
| 225 | }; |
| 226 | |
| 227 | static struct msm_camera_sensor_info msm_camera_sensor_ov5647_data = { |
| 228 | .sensor_name = "ov5647", |
| 229 | .sensor_reset_enable = 1, |
| 230 | .pmic_gpio_enable = 1, |
| 231 | .sensor_reset = GPIO_SKU3_CAM_5MP_CAMIF_RESET, |
| 232 | .sensor_pwd = GPIO_SKU3_CAM_5MP_SHDN_N, |
| 233 | .pdata = &msm_camera_device_data_csi1, |
| 234 | .flash_data = &flash_ov5647, |
| 235 | .sensor_platform_info = &sensor_board_info_ov5647, |
| 236 | .csi_if = 1, |
| 237 | .camera_type = BACK_CAMERA_2D, |
Raju P.L.S.S.S.N | 3f4b302 | 2012-03-29 10:09:01 +0530 | [diff] [blame] | 238 | .sensor_type = BAYER_SENSOR, |
Rajakumar Govindaram | 6627b36 | 2012-01-29 19:00:30 -0800 | [diff] [blame] | 239 | .actuator_info = &msm_act_main_cam_5_info, |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 240 | }; |
| 241 | |
| 242 | #endif |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 243 | #ifdef CONFIG_MT9E013 |
| 244 | static struct msm_camera_sensor_flash_data flash_mt9e013 = { |
| 245 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 246 | .flash_src = &msm_flash_src |
| 247 | }; |
| 248 | |
| 249 | static struct msm_camera_sensor_platform_info sensor_board_info_mt9e013 = { |
| 250 | .mount_angle = 90, |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 251 | .cam_vreg = msm_cam_vreg, |
| 252 | .num_vreg = ARRAY_SIZE(msm_cam_vreg), |
| 253 | .gpio_conf = &gpio_conf_mt9e013, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 254 | }; |
| 255 | |
| 256 | static struct msm_camera_sensor_info msm_camera_sensor_mt9e013_data = { |
| 257 | .sensor_name = "mt9e013", |
| 258 | .sensor_reset_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 259 | .pmic_gpio_enable = 0, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 260 | .pdata = &msm_camera_device_data_csi1, |
| 261 | .flash_data = &flash_mt9e013, |
| 262 | .sensor_platform_info = &sensor_board_info_mt9e013, |
| 263 | .csi_if = 1, |
| 264 | .camera_type = BACK_CAMERA_2D, |
Raju P.L.S.S.S.N | 3f4b302 | 2012-03-29 10:09:01 +0530 | [diff] [blame] | 265 | .sensor_type = BAYER_SENSOR, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 266 | }; |
| 267 | #endif |
| 268 | |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 269 | #ifdef CONFIG_WEBCAM_OV9726 |
| 270 | static struct msm_camera_sensor_flash_data flash_ov9726 = { |
| 271 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 272 | .flash_src = &msm_flash_src |
| 273 | }; |
| 274 | |
| 275 | static struct msm_camera_sensor_platform_info sensor_board_info_ov9726 = { |
| 276 | .mount_angle = 90, |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 277 | .cam_vreg = msm_cam_vreg, |
| 278 | .num_vreg = ARRAY_SIZE(msm_cam_vreg), |
| 279 | .gpio_conf = &gpio_conf_ov9726, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 280 | }; |
| 281 | |
| 282 | static struct msm_camera_sensor_info msm_camera_sensor_ov9726_data = { |
| 283 | .sensor_name = "ov9726", |
| 284 | .sensor_reset_enable = 0, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 285 | .pmic_gpio_enable = 0, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 286 | .pdata = &msm_camera_device_data_csi0, |
| 287 | .flash_data = &flash_ov9726, |
| 288 | .sensor_platform_info = &sensor_board_info_ov9726, |
| 289 | .csi_if = 1, |
| 290 | .camera_type = FRONT_CAMERA_2D, |
Raju P.L.S.S.S.N | 3f4b302 | 2012-03-29 10:09:01 +0530 | [diff] [blame] | 291 | .sensor_type = BAYER_SENSOR, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 292 | }; |
| 293 | #endif |
| 294 | |
Kevin Chan | 94b4c83 | 2012-03-02 21:27:16 -0800 | [diff] [blame] | 295 | static struct platform_device msm_camera_server = { |
| 296 | .name = "msm_cam_server", |
| 297 | .id = 0, |
| 298 | }; |
| 299 | |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 300 | static void __init msm7x27a_init_cam(void) |
| 301 | { |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 302 | if (!(machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 303 | || machine_is_msm7627a_qrd1() |
| 304 | || machine_is_msm8625_ffa())) { |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 305 | sensor_board_info_s5k4e1.cam_vreg = NULL; |
| 306 | sensor_board_info_s5k4e1.num_vreg = 0; |
| 307 | sensor_board_info_mt9e013.cam_vreg = NULL; |
| 308 | sensor_board_info_mt9e013.num_vreg = 0; |
| 309 | sensor_board_info_ov9726.cam_vreg = NULL; |
| 310 | sensor_board_info_ov9726.num_vreg = 0; |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 311 | sensor_board_info_ov7692.cam_vreg = NULL; |
| 312 | sensor_board_info_ov7692.num_vreg = 0; |
| 313 | sensor_board_info_ov5647.cam_vreg = NULL; |
| 314 | sensor_board_info_ov5647.num_vreg = 0; |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 315 | } |
Kevin Chan | 94b4c83 | 2012-03-02 21:27:16 -0800 | [diff] [blame] | 316 | platform_device_register(&msm_camera_server); |
Raju P.L.S.S.S.N | 2b34501 | 2012-03-15 10:18:30 +0530 | [diff] [blame] | 317 | if (machine_is_msm8625_surf() || machine_is_msm8625_evb()) { |
| 318 | platform_device_register(&msm8625_device_csic0); |
| 319 | platform_device_register(&msm8625_device_csic1); |
| 320 | } else { |
| 321 | platform_device_register(&msm7x27a_device_csic0); |
| 322 | platform_device_register(&msm7x27a_device_csic1); |
| 323 | } |
Suresh Vankadara | 6050cef5 | 2012-04-16 21:44:59 +0530 | [diff] [blame] | 324 | if (machine_is_msm8625_evb()) |
| 325 | *(int *) msm7x27a_device_clkctl.dev.platform_data = 1; |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 326 | platform_device_register(&msm7x27a_device_clkctl); |
| 327 | platform_device_register(&msm7x27a_device_vfe); |
| 328 | } |
| 329 | |
| 330 | static struct i2c_board_info i2c_camera_devices[] = { |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 331 | { |
| 332 | I2C_BOARD_INFO("s5k4e1", 0x36), |
| 333 | .platform_data = &msm_camera_sensor_s5k4e1_data, |
| 334 | }, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 335 | { |
| 336 | I2C_BOARD_INFO("ov9726", 0x10), |
| 337 | .platform_data = &msm_camera_sensor_ov9726_data, |
| 338 | }, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 339 | { |
| 340 | I2C_BOARD_INFO("mt9e013", 0x6C >> 2), |
| 341 | .platform_data = &msm_camera_sensor_mt9e013_data, |
| 342 | }, |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 343 | { |
| 344 | I2C_BOARD_INFO("ov7692", 0x78), |
| 345 | .platform_data = &msm_camera_sensor_ov7692_data, |
| 346 | }, |
| 347 | { |
| 348 | I2C_BOARD_INFO("ov5647", 0x36 << 1), |
| 349 | .platform_data = &msm_camera_sensor_ov5647_data, |
| 350 | }, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 351 | { |
| 352 | I2C_BOARD_INFO("sc628a", 0x6E), |
| 353 | }, |
| 354 | }; |
| 355 | #else |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 356 | static uint32_t camera_off_gpio_table[] = { |
| 357 | GPIO_CFG(15, 0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), |
| 358 | }; |
| 359 | |
| 360 | static uint32_t camera_on_gpio_table[] = { |
| 361 | GPIO_CFG(15, 1, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), |
| 362 | }; |
| 363 | |
| 364 | #ifdef CONFIG_MSM_CAMERA_FLASH |
| 365 | static struct msm_camera_sensor_flash_src msm_flash_src = { |
| 366 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_EXT, |
| 367 | ._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1, |
| 368 | ._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2, |
| 369 | }; |
| 370 | #endif |
| 371 | |
| 372 | static struct regulator_bulk_data regs_camera[] = { |
| 373 | { .supply = "msme1", .min_uV = 1800000, .max_uV = 1800000 }, |
| 374 | { .supply = "gp2", .min_uV = 2850000, .max_uV = 2850000 }, |
| 375 | { .supply = "usb2", .min_uV = 1800000, .max_uV = 1800000 }, |
| 376 | }; |
| 377 | |
| 378 | static void qrd1_camera_gpio_cfg(void) |
| 379 | { |
| 380 | |
| 381 | int rc = 0; |
| 382 | |
| 383 | rc = gpio_request(QRD_GPIO_CAM_5MP_SHDN_EN, "ov5640"); |
| 384 | if (rc < 0) |
| 385 | pr_err("%s: gpio_request---GPIO_CAM_5MP_SHDN_EN failed!", |
| 386 | __func__); |
| 387 | |
| 388 | |
| 389 | rc = gpio_tlmm_config(GPIO_CFG(QRD_GPIO_CAM_5MP_SHDN_EN, 0, |
| 390 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, |
| 391 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 392 | if (rc < 0) { |
| 393 | pr_err("%s: unable to enable Power Down gpio for main" |
| 394 | "camera!\n", __func__); |
| 395 | gpio_free(QRD_GPIO_CAM_5MP_SHDN_EN); |
| 396 | } |
| 397 | |
| 398 | |
| 399 | rc = gpio_request(QRD_GPIO_CAM_5MP_RESET, "ov5640"); |
| 400 | if (rc < 0) { |
| 401 | pr_err("%s: gpio_request---GPIO_CAM_5MP_RESET failed!", |
| 402 | __func__); |
| 403 | gpio_free(QRD_GPIO_CAM_5MP_SHDN_EN); |
| 404 | } |
| 405 | |
| 406 | |
| 407 | rc = gpio_tlmm_config(GPIO_CFG(QRD_GPIO_CAM_5MP_RESET, 0, |
| 408 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, |
| 409 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 410 | if (rc < 0) { |
| 411 | pr_err("%s: unable to enable reset gpio for main camera!\n", |
| 412 | __func__); |
| 413 | gpio_free(QRD_GPIO_CAM_5MP_RESET); |
| 414 | } |
| 415 | |
| 416 | rc = gpio_request(QRD_GPIO_CAM_3MP_PWDN, "ov7692"); |
| 417 | if (rc < 0) |
| 418 | pr_err("%s: gpio_request---GPIO_CAM_3MP_PWDN failed!", |
| 419 | __func__); |
| 420 | |
| 421 | rc = gpio_tlmm_config(GPIO_CFG(QRD_GPIO_CAM_3MP_PWDN, 0, |
| 422 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, |
| 423 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 424 | if (rc < 0) { |
| 425 | pr_err("%s: unable to enable Power Down gpio for front" |
| 426 | "camera!\n", __func__); |
| 427 | gpio_free(QRD_GPIO_CAM_3MP_PWDN); |
| 428 | } |
| 429 | |
| 430 | gpio_direction_output(QRD_GPIO_CAM_5MP_SHDN_EN, 1); |
| 431 | gpio_direction_output(QRD_GPIO_CAM_5MP_RESET, 1); |
| 432 | gpio_direction_output(QRD_GPIO_CAM_3MP_PWDN, 1); |
| 433 | } |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 434 | #endif |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 435 | |
| 436 | static void evb_camera_gpio_cfg(void) |
| 437 | { |
| 438 | int rc = 0; |
| 439 | |
| 440 | rc = gpio_request(GPIO_SKU3_CAM_5MP_SHDN_N, "ov5647"); |
| 441 | if (rc < 0) |
| 442 | pr_err("%s: gpio_request GPIO_SKU3_CAM_5MP_SHDN_N failed!", |
| 443 | __func__); |
| 444 | |
| 445 | pr_debug("gpio_tlmm_config %d\r\n", GPIO_SKU3_CAM_5MP_SHDN_N); |
| 446 | rc = gpio_tlmm_config(GPIO_CFG(GPIO_SKU3_CAM_5MP_SHDN_N, 0, |
| 447 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 448 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 449 | if (rc < 0) { |
| 450 | pr_err("%s:unable to enable Powr Dwn gpio for main camera!\n", |
| 451 | __func__); |
| 452 | gpio_free(GPIO_SKU3_CAM_5MP_SHDN_N); |
| 453 | } |
| 454 | |
| 455 | gpio_direction_output(GPIO_SKU3_CAM_5MP_SHDN_N, 1); |
| 456 | |
| 457 | rc = gpio_request(GPIO_SKU3_CAM_5MP_CAMIF_RESET, "ov5647"); |
| 458 | if (rc < 0) |
| 459 | pr_err("%s: gpio_request GPIO_SKU3_CAM_5MP_CAMIF_RESET failed!", |
| 460 | __func__); |
| 461 | |
| 462 | pr_debug("gpio_tlmm_config %d\r\n", GPIO_SKU3_CAM_5MP_CAMIF_RESET); |
| 463 | rc = gpio_tlmm_config(GPIO_CFG(GPIO_SKU3_CAM_5MP_CAMIF_RESET, 0, |
| 464 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 465 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 466 | if (rc < 0) { |
| 467 | pr_err("%s: unable to enable reset gpio for main camera!\n", |
| 468 | __func__); |
| 469 | gpio_free(GPIO_SKU3_CAM_5MP_CAMIF_RESET); |
| 470 | } |
| 471 | |
| 472 | gpio_direction_output(GPIO_SKU3_CAM_5MP_CAMIF_RESET, 1); |
| 473 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 474 | } |
| 475 | |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 476 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
| 477 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 478 | static void msm_camera_vreg_config(int vreg_en) |
| 479 | { |
| 480 | int rc = vreg_en ? |
| 481 | regulator_bulk_enable(ARRAY_SIZE(regs_camera), regs_camera) : |
| 482 | regulator_bulk_disable(ARRAY_SIZE(regs_camera), regs_camera); |
| 483 | |
| 484 | if (rc) |
| 485 | pr_err("%s: could not %sable regulators: %d\n", |
| 486 | __func__, vreg_en ? "en" : "dis", rc); |
| 487 | } |
| 488 | |
| 489 | static int config_gpio_table(uint32_t *table, int len) |
| 490 | { |
| 491 | int rc = 0, i = 0; |
| 492 | |
| 493 | for (i = 0; i < len; i++) { |
| 494 | rc = gpio_tlmm_config(table[i], GPIO_CFG_ENABLE); |
| 495 | if (rc) { |
| 496 | pr_err("%s not able to get gpio\n", __func__); |
| 497 | for (i--; i >= 0; i--) |
| 498 | gpio_tlmm_config(camera_off_gpio_table[i], |
| 499 | GPIO_CFG_ENABLE); |
| 500 | break; |
| 501 | } |
| 502 | } |
| 503 | return rc; |
| 504 | } |
| 505 | |
| 506 | static int config_camera_on_gpios_rear(void) |
| 507 | { |
| 508 | int rc = 0; |
| 509 | |
| 510 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 511 | || machine_is_msm7627a_qrd1() |
| 512 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 513 | msm_camera_vreg_config(1); |
| 514 | |
| 515 | rc = config_gpio_table(camera_on_gpio_table, |
| 516 | ARRAY_SIZE(camera_on_gpio_table)); |
| 517 | if (rc < 0) { |
| 518 | pr_err("%s: CAMSENSOR gpio table request" |
| 519 | "failed\n", __func__); |
| 520 | return rc; |
| 521 | } |
| 522 | |
| 523 | return rc; |
| 524 | } |
| 525 | |
| 526 | static void config_camera_off_gpios_rear(void) |
| 527 | { |
| 528 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 529 | || machine_is_msm7627a_qrd1() |
| 530 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 531 | msm_camera_vreg_config(0); |
| 532 | |
| 533 | config_gpio_table(camera_off_gpio_table, |
| 534 | ARRAY_SIZE(camera_off_gpio_table)); |
| 535 | } |
| 536 | |
| 537 | static int config_camera_on_gpios_front(void) |
| 538 | { |
| 539 | int rc = 0; |
| 540 | |
| 541 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 542 | || machine_is_msm7627a_qrd1() |
| 543 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 544 | msm_camera_vreg_config(1); |
| 545 | |
| 546 | rc = config_gpio_table(camera_on_gpio_table, |
| 547 | ARRAY_SIZE(camera_on_gpio_table)); |
| 548 | if (rc < 0) { |
| 549 | pr_err("%s: CAMSENSOR gpio table request" |
| 550 | "failed\n", __func__); |
| 551 | return rc; |
| 552 | } |
| 553 | |
| 554 | return rc; |
| 555 | } |
| 556 | |
| 557 | static void config_camera_off_gpios_front(void) |
| 558 | { |
| 559 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 560 | || machine_is_msm7627a_qrd1() |
| 561 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 562 | msm_camera_vreg_config(0); |
| 563 | |
| 564 | config_gpio_table(camera_off_gpio_table, |
| 565 | ARRAY_SIZE(camera_off_gpio_table)); |
| 566 | } |
| 567 | |
| 568 | struct msm_camera_device_platform_data msm_camera_device_data_rear = { |
| 569 | .camera_gpio_on = config_camera_on_gpios_rear, |
| 570 | .camera_gpio_off = config_camera_off_gpios_rear, |
| 571 | .ioext.csiphy = 0xA1000000, |
| 572 | .ioext.csisz = 0x00100000, |
| 573 | .ioext.csiirq = INT_CSI_IRQ_1, |
| 574 | .ioclk.mclk_clk_rate = 24000000, |
| 575 | .ioclk.vfe_clk_rate = 192000000, |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 576 | .ioext.appphy = MSM7XXX_CLK_CTL_PHYS, |
| 577 | .ioext.appsz = MSM7XXX_CLK_CTL_SIZE, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 578 | }; |
| 579 | |
| 580 | struct msm_camera_device_platform_data msm_camera_device_data_front = { |
| 581 | .camera_gpio_on = config_camera_on_gpios_front, |
| 582 | .camera_gpio_off = config_camera_off_gpios_front, |
| 583 | .ioext.csiphy = 0xA0F00000, |
| 584 | .ioext.csisz = 0x00100000, |
| 585 | .ioext.csiirq = INT_CSI_IRQ_0, |
| 586 | .ioclk.mclk_clk_rate = 24000000, |
| 587 | .ioclk.vfe_clk_rate = 192000000, |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 588 | .ioext.appphy = MSM7XXX_CLK_CTL_PHYS, |
| 589 | .ioext.appsz = MSM7XXX_CLK_CTL_SIZE, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 590 | }; |
| 591 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 592 | #ifdef CONFIG_OV5647 |
| 593 | |
| 594 | static struct msm_camera_sensor_platform_info ov5647_sensor_7627a_info = { |
| 595 | .mount_angle = 90 |
| 596 | }; |
| 597 | |
| 598 | static struct msm_camera_sensor_flash_src msm_flash_src_ov5647 = { |
| 599 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_LED, |
| 600 | ._fsrc.led_src.led_name = "flashlight", |
| 601 | ._fsrc.led_src.led_name_len = 10, |
| 602 | }; |
| 603 | |
| 604 | static struct msm_camera_sensor_flash_data flash_ov5647 = { |
| 605 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 606 | .flash_src = &msm_flash_src_ov5647, |
| 607 | }; |
| 608 | |
| 609 | static struct msm_camera_sensor_info msm_camera_sensor_ov5647_data = { |
| 610 | .sensor_name = "ov5647", |
| 611 | .sensor_reset_enable = 1, |
| 612 | .sensor_reset = GPIO_SKU3_CAM_5MP_CAMIF_RESET, |
| 613 | .pmic_gpio_enable = 1, |
| 614 | .sensor_pwd = GPIO_SKU3_CAM_5MP_SHDN_N, |
| 615 | .vcm_pwd = GPIO_SKU3_CAM_5MP_CAM_DRIVER_PWDN, |
Lokesh Kumar Aakulu | fe9c3ec | 2012-02-22 19:26:29 +0530 | [diff] [blame] | 616 | .vcm_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 617 | .pdata = &msm_camera_device_data_rear, |
| 618 | .flash_data = &flash_ov5647, |
| 619 | .sensor_platform_info = &ov5647_sensor_7627a_info, |
| 620 | .csi_if = 1 |
| 621 | }; |
| 622 | |
| 623 | static struct platform_device msm_camera_sensor_ov5647 = { |
| 624 | .name = "msm_camera_ov5647", |
| 625 | .dev = { |
| 626 | .platform_data = &msm_camera_sensor_ov5647_data, |
| 627 | }, |
| 628 | }; |
| 629 | #endif |
| 630 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 631 | #ifdef CONFIG_S5K4E1 |
| 632 | static struct msm_camera_sensor_platform_info s5k4e1_sensor_7627a_info = { |
| 633 | .mount_angle = 90 |
| 634 | }; |
| 635 | |
| 636 | static struct msm_camera_sensor_flash_data flash_s5k4e1 = { |
| 637 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 638 | .flash_src = &msm_flash_src |
| 639 | }; |
| 640 | |
| 641 | static struct msm_camera_sensor_info msm_camera_sensor_s5k4e1_data = { |
| 642 | .sensor_name = "s5k4e1", |
| 643 | .sensor_reset_enable = 1, |
| 644 | .sensor_reset = GPIO_CAM_GP_CAMIF_RESET_N, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 645 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 646 | .sensor_pwd = 85, |
| 647 | .vcm_pwd = GPIO_CAM_GP_CAM_PWDN, |
| 648 | .vcm_enable = 1, |
| 649 | .pdata = &msm_camera_device_data_rear, |
| 650 | .flash_data = &flash_s5k4e1, |
| 651 | .sensor_platform_info = &s5k4e1_sensor_7627a_info, |
| 652 | .csi_if = 1 |
| 653 | }; |
| 654 | |
| 655 | static struct platform_device msm_camera_sensor_s5k4e1 = { |
| 656 | .name = "msm_camera_s5k4e1", |
| 657 | .dev = { |
| 658 | .platform_data = &msm_camera_sensor_s5k4e1_data, |
| 659 | }, |
| 660 | }; |
| 661 | #endif |
| 662 | |
| 663 | #ifdef CONFIG_IMX072 |
| 664 | static struct msm_camera_sensor_platform_info imx072_sensor_7627a_info = { |
| 665 | .mount_angle = 90 |
| 666 | }; |
| 667 | |
| 668 | static struct msm_camera_sensor_flash_data flash_imx072 = { |
| 669 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 670 | .flash_src = &msm_flash_src |
| 671 | }; |
| 672 | |
| 673 | static struct msm_camera_sensor_info msm_camera_sensor_imx072_data = { |
| 674 | .sensor_name = "imx072", |
| 675 | .sensor_reset_enable = 1, |
| 676 | .sensor_reset = GPIO_CAM_GP_CAMIF_RESET_N, /* TODO 106,*/ |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 677 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 678 | .sensor_pwd = 85, |
| 679 | .vcm_pwd = GPIO_CAM_GP_CAM_PWDN, |
| 680 | .vcm_enable = 1, |
| 681 | .pdata = &msm_camera_device_data_rear, |
| 682 | .flash_data = &flash_imx072, |
| 683 | .sensor_platform_info = &imx072_sensor_7627a_info, |
| 684 | .csi_if = 1 |
| 685 | }; |
| 686 | |
| 687 | static struct platform_device msm_camera_sensor_imx072 = { |
| 688 | .name = "msm_camera_imx072", |
| 689 | .dev = { |
| 690 | .platform_data = &msm_camera_sensor_imx072_data, |
| 691 | }, |
| 692 | }; |
| 693 | #endif |
| 694 | |
| 695 | static struct msm_camera_sensor_info msm_camera_sensor_ov9726_data; |
| 696 | #ifdef CONFIG_WEBCAM_OV9726 |
| 697 | static struct msm_camera_sensor_platform_info ov9726_sensor_7627a_info = { |
| 698 | .mount_angle = 90 |
| 699 | }; |
| 700 | |
| 701 | static struct msm_camera_sensor_flash_data flash_ov9726 = { |
| 702 | .flash_type = MSM_CAMERA_FLASH_NONE, |
| 703 | .flash_src = &msm_flash_src |
| 704 | }; |
| 705 | |
| 706 | static struct msm_camera_sensor_info msm_camera_sensor_ov9726_data = { |
| 707 | .sensor_name = "ov9726", |
| 708 | .sensor_reset_enable = 0, |
| 709 | .sensor_reset = GPIO_CAM_GP_CAM1MP_XCLR, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 710 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 711 | .sensor_pwd = 85, |
| 712 | .vcm_pwd = 1, |
| 713 | .vcm_enable = 0, |
| 714 | .pdata = &msm_camera_device_data_front, |
| 715 | .flash_data = &flash_ov9726, |
| 716 | .sensor_platform_info = &ov9726_sensor_7627a_info, |
| 717 | .csi_if = 1 |
| 718 | }; |
| 719 | |
| 720 | static struct platform_device msm_camera_sensor_ov9726 = { |
| 721 | .name = "msm_camera_ov9726", |
| 722 | .dev = { |
| 723 | .platform_data = &msm_camera_sensor_ov9726_data, |
| 724 | }, |
| 725 | }; |
| 726 | #else |
| 727 | static inline void msm_camera_vreg_init(void) { } |
| 728 | #endif |
| 729 | |
| 730 | #ifdef CONFIG_MT9E013 |
| 731 | static struct msm_camera_sensor_platform_info mt9e013_sensor_7627a_info = { |
| 732 | .mount_angle = 90 |
| 733 | }; |
| 734 | |
| 735 | static struct msm_camera_sensor_flash_data flash_mt9e013 = { |
| 736 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 737 | .flash_src = &msm_flash_src |
| 738 | }; |
| 739 | |
| 740 | static struct msm_camera_sensor_info msm_camera_sensor_mt9e013_data = { |
| 741 | .sensor_name = "mt9e013", |
| 742 | .sensor_reset = 0, |
| 743 | .sensor_reset_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 744 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 745 | .sensor_pwd = 85, |
| 746 | .vcm_pwd = 1, |
| 747 | .vcm_enable = 0, |
| 748 | .pdata = &msm_camera_device_data_rear, |
| 749 | .flash_data = &flash_mt9e013, |
| 750 | .sensor_platform_info = &mt9e013_sensor_7627a_info, |
| 751 | .csi_if = 1 |
| 752 | }; |
| 753 | |
| 754 | static struct platform_device msm_camera_sensor_mt9e013 = { |
| 755 | .name = "msm_camera_mt9e013", |
| 756 | .dev = { |
| 757 | .platform_data = &msm_camera_sensor_mt9e013_data, |
| 758 | }, |
| 759 | }; |
| 760 | #endif |
| 761 | |
| 762 | #ifdef CONFIG_OV5640 |
| 763 | static struct msm_camera_sensor_platform_info ov5640_sensor_info = { |
| 764 | .mount_angle = 90 |
| 765 | }; |
| 766 | |
| 767 | static struct msm_camera_sensor_flash_src msm_flash_src_ov5640 = { |
| 768 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_LED, |
| 769 | ._fsrc.led_src.led_name = "flashlight", |
| 770 | ._fsrc.led_src.led_name_len = 10, |
| 771 | }; |
| 772 | |
| 773 | static struct msm_camera_sensor_flash_data flash_ov5640 = { |
| 774 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 775 | .flash_src = &msm_flash_src_ov5640, |
| 776 | }; |
| 777 | |
| 778 | static struct msm_camera_sensor_info msm_camera_sensor_ov5640_data = { |
| 779 | .sensor_name = "ov5640", |
| 780 | .sensor_reset_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 781 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 782 | .sensor_reset = QRD_GPIO_CAM_5MP_RESET, |
| 783 | .sensor_pwd = QRD_GPIO_CAM_5MP_SHDN_EN, |
| 784 | .vcm_pwd = 0, |
| 785 | .vcm_enable = 0, |
| 786 | .pdata = &msm_camera_device_data_rear, |
| 787 | .flash_data = &flash_ov5640, |
| 788 | .sensor_platform_info = &ov5640_sensor_info, |
| 789 | .csi_if = 1, |
| 790 | }; |
| 791 | |
| 792 | static struct platform_device msm_camera_sensor_ov5640 = { |
| 793 | .name = "msm_camera_ov5640", |
| 794 | .dev = { |
| 795 | .platform_data = &msm_camera_sensor_ov5640_data, |
| 796 | }, |
| 797 | }; |
| 798 | #endif |
| 799 | |
| 800 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 801 | static struct msm_camera_sensor_platform_info ov7692_sensor_7627a_info = { |
| 802 | .mount_angle = 90 |
| 803 | }; |
| 804 | |
| 805 | static struct msm_camera_sensor_flash_data flash_ov7692 = { |
| 806 | .flash_type = MSM_CAMERA_FLASH_NONE, |
| 807 | }; |
| 808 | |
| 809 | static struct msm_camera_sensor_info msm_camera_sensor_ov7692_data = { |
| 810 | .sensor_name = "ov7692", |
| 811 | .sensor_reset_enable = 0, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 812 | .pmic_gpio_enable = 1, |
| 813 | .sensor_reset = GPIO_SKU1_CAM_VGA_RESET_N, |
| 814 | .sensor_pwd = GPIO_SKU1_CAM_VGA_SHDN, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 815 | .vcm_pwd = 0, |
| 816 | .vcm_enable = 0, |
| 817 | .pdata = &msm_camera_device_data_front, |
| 818 | .flash_data = &flash_ov7692, |
| 819 | .sensor_platform_info = &ov7692_sensor_7627a_info, |
| 820 | .csi_if = 1, |
| 821 | }; |
| 822 | |
| 823 | static struct platform_device msm_camera_sensor_ov7692 = { |
| 824 | .name = "msm_camera_ov7692", |
| 825 | .dev = { |
| 826 | .platform_data = &msm_camera_sensor_ov7692_data, |
| 827 | }, |
| 828 | }; |
| 829 | #endif |
| 830 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 831 | static struct i2c_board_info i2c_camera_devices[] = { |
| 832 | #ifdef CONFIG_S5K4E1 |
| 833 | { |
| 834 | I2C_BOARD_INFO("s5k4e1", 0x36), |
| 835 | }, |
| 836 | { |
| 837 | I2C_BOARD_INFO("s5k4e1_af", 0x8c >> 1), |
| 838 | }, |
| 839 | #endif |
| 840 | #ifdef CONFIG_WEBCAM_OV9726 |
| 841 | { |
| 842 | I2C_BOARD_INFO("ov9726", 0x10), |
| 843 | }, |
| 844 | #endif |
| 845 | #ifdef CONFIG_IMX072 |
| 846 | { |
| 847 | I2C_BOARD_INFO("imx072", 0x34), |
| 848 | }, |
| 849 | #endif |
| 850 | #ifdef CONFIG_MT9E013 |
| 851 | { |
| 852 | I2C_BOARD_INFO("mt9e013", 0x6C >> 2), |
| 853 | }, |
| 854 | #endif |
| 855 | { |
| 856 | I2C_BOARD_INFO("sc628a", 0x6E), |
| 857 | }, |
| 858 | }; |
| 859 | |
| 860 | static struct i2c_board_info i2c_camera_devices_qrd[] = { |
| 861 | #ifdef CONFIG_OV5640 |
| 862 | { |
| 863 | I2C_BOARD_INFO("ov5640", 0x78 >> 1), |
| 864 | }, |
| 865 | #endif |
| 866 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 867 | { |
| 868 | I2C_BOARD_INFO("ov7692", 0x78), |
| 869 | }, |
| 870 | #endif |
| 871 | }; |
| 872 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 873 | static struct i2c_board_info i2c_camera_devices_evb[] = { |
| 874 | #ifdef CONFIG_OV5647 |
| 875 | { |
| 876 | I2C_BOARD_INFO("ov5647", 0x36 << 1), |
| 877 | }, |
| 878 | { |
| 879 | I2C_BOARD_INFO("ov5647_af", 0x18 >> 1), |
| 880 | }, |
| 881 | #endif |
| 882 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 883 | { |
| 884 | I2C_BOARD_INFO("ov7692", 0x78), |
| 885 | }, |
| 886 | #endif |
| 887 | }; |
| 888 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 889 | static struct platform_device *camera_devices_msm[] __initdata = { |
| 890 | #ifdef CONFIG_S5K4E1 |
| 891 | &msm_camera_sensor_s5k4e1, |
| 892 | #endif |
| 893 | #ifdef CONFIG_IMX072 |
| 894 | &msm_camera_sensor_imx072, |
| 895 | #endif |
| 896 | #ifdef CONFIG_WEBCAM_OV9726 |
| 897 | &msm_camera_sensor_ov9726, |
| 898 | #endif |
| 899 | #ifdef CONFIG_MT9E013 |
| 900 | &msm_camera_sensor_mt9e013, |
| 901 | #endif |
| 902 | }; |
| 903 | |
| 904 | static struct platform_device *camera_devices_qrd[] __initdata = { |
| 905 | #ifdef CONFIG_OV5640 |
| 906 | &msm_camera_sensor_ov5640, |
| 907 | #endif |
| 908 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 909 | &msm_camera_sensor_ov7692, |
| 910 | #endif |
| 911 | }; |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 912 | |
| 913 | static struct platform_device *camera_devices_evb[] __initdata = { |
| 914 | #ifdef CONFIG_OV5647 |
| 915 | &msm_camera_sensor_ov5647, |
| 916 | #endif |
| 917 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 918 | &msm_camera_sensor_ov7692, |
| 919 | #endif |
| 920 | }; |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 921 | #endif |
| 922 | |
| 923 | enum { |
| 924 | SX150X_CAM, |
| 925 | }; |
| 926 | |
| 927 | static struct sx150x_platform_data sx150x_data[] __initdata = { |
| 928 | [SX150X_CAM] = { |
| 929 | .gpio_base = GPIO_CAM_EXPANDER_BASE, |
| 930 | .oscio_is_gpo = false, |
| 931 | .io_pullup_ena = 0, |
| 932 | .io_pulldn_ena = 0, |
| 933 | .io_open_drain_ena = 0x23, |
| 934 | .irq_summary = -1, |
| 935 | }, |
| 936 | }; |
| 937 | |
| 938 | static struct i2c_board_info cam_exp_i2c_info[] __initdata = { |
| 939 | { |
| 940 | I2C_BOARD_INFO("sx1508q", 0x22), |
| 941 | .platform_data = &sx150x_data[SX150X_CAM], |
| 942 | }, |
| 943 | }; |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 944 | |
| 945 | static void __init register_i2c_devices(void) |
| 946 | { |
| 947 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 948 | cam_exp_i2c_info, |
| 949 | ARRAY_SIZE(cam_exp_i2c_info)); |
| 950 | } |
| 951 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 952 | #define LCD_CAMERA_LDO_2V8 35 /* SKU1&SKU3 2.8V LDO */ |
| 953 | #define SKU3_LCD_CAMERA_LDO_1V8 40 /* SKU3 1.8V LDO */ |
| 954 | |
| 955 | static int lcd_camera_ldo_1v8 = SKU3_LCD_CAMERA_LDO_1V8; |
| 956 | |
| 957 | static void lcd_camera_power_init(void) |
| 958 | { |
| 959 | int rc = 0; |
| 960 | |
| 961 | pr_debug("lcd_camera_power_init\n"); |
| 962 | |
| 963 | lcd_camera_ldo_1v8 = SKU3_LCD_CAMERA_LDO_1V8; /* SKU3 PVT */ |
| 964 | |
| 965 | /* LDO_EXT2V8 */ |
| 966 | if (gpio_request(LCD_CAMERA_LDO_2V8, "lcd_camera_ldo_2v8")) { |
| 967 | pr_err("failed to request gpio lcd_camera_ldo_2v8\n"); |
| 968 | return; |
| 969 | } |
| 970 | |
| 971 | rc = gpio_tlmm_config(GPIO_CFG(LCD_CAMERA_LDO_2V8, 0, |
| 972 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 973 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 974 | if (rc < 0) { |
| 975 | pr_err("%s: unable to enable lcd_camera_ldo_2v8!\n", __func__); |
| 976 | goto fail_gpio2; |
| 977 | } |
| 978 | |
| 979 | /* LDO_EVT1V8 */ |
| 980 | if (gpio_request(lcd_camera_ldo_1v8, "lcd_camera_ldo_1v8")) { |
| 981 | pr_err("failed to request gpio lcd_camera_ldo_1v8\n"); |
| 982 | goto fail_gpio2; |
| 983 | } |
| 984 | |
| 985 | rc = gpio_tlmm_config(GPIO_CFG(lcd_camera_ldo_1v8, 0, |
| 986 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 987 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 988 | if (rc < 0) { |
| 989 | pr_err("%s: unable to enable lcd_camera_ldo_1v8!\n", __func__); |
| 990 | goto fail_gpio1; |
| 991 | } |
| 992 | |
| 993 | return; |
| 994 | |
| 995 | fail_gpio1: |
| 996 | gpio_free(lcd_camera_ldo_1v8); |
| 997 | fail_gpio2: |
| 998 | gpio_free(LCD_CAMERA_LDO_2V8); |
| 999 | |
| 1000 | return; |
| 1001 | } |
| 1002 | |
| 1003 | static int lcd_camera_power_on_sku3(void) |
| 1004 | { |
| 1005 | int rc = 0; |
| 1006 | |
| 1007 | pr_debug("turn on sku3 lcd_camera_ldo_1v8\n"); |
| 1008 | gpio_set_value_cansleep(lcd_camera_ldo_1v8, 1); |
| 1009 | |
| 1010 | pr_debug("turn on sku3 lcd_camera_ldo\n"); |
| 1011 | gpio_set_value_cansleep(LCD_CAMERA_LDO_2V8, 1); |
| 1012 | |
| 1013 | return rc; |
| 1014 | } |
| 1015 | |
| 1016 | static int lcd_camera_power_off_sku3(void) |
| 1017 | { |
| 1018 | int rc = 0; |
| 1019 | |
| 1020 | pr_debug("turn off sku3 lcd_camera_ldo_1v8\n"); |
| 1021 | gpio_set_value_cansleep(lcd_camera_ldo_1v8, 0); |
| 1022 | |
| 1023 | pr_debug("turn off sku3 lcd_camera_ldo\n"); |
| 1024 | gpio_set_value_cansleep(LCD_CAMERA_LDO_2V8, 0); |
| 1025 | |
| 1026 | gpio_free(lcd_camera_ldo_1v8); |
| 1027 | gpio_free(LCD_CAMERA_LDO_2V8); |
| 1028 | |
| 1029 | return rc; |
| 1030 | } |
| 1031 | |
| 1032 | int lcd_camera_power_onoff(int on) |
| 1033 | { |
| 1034 | int rc = 0; |
| 1035 | |
| 1036 | pr_debug("lcd_camera_power_onoff on = %d,\n", on); |
| 1037 | |
| 1038 | if (on) |
| 1039 | rc = lcd_camera_power_on_sku3(); |
| 1040 | else |
| 1041 | rc = lcd_camera_power_off_sku3(); |
| 1042 | |
| 1043 | return rc; |
| 1044 | } |
| 1045 | EXPORT_SYMBOL(lcd_camera_power_onoff); |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1046 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1047 | void __init msm7627a_camera_init(void) |
| 1048 | { |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 1049 | |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1050 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1051 | int rc; |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 1052 | #endif |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1053 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1054 | pr_debug("msm7627a_camera_init Entered\n"); |
| 1055 | /* LCD and camera power (VREG & LDO) init */ |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 1056 | if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) { |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1057 | lcd_camera_power_init(); |
Raju P.L.S.S.S.N | cea3151 | 2012-03-20 11:57:50 +0530 | [diff] [blame] | 1058 | evb_camera_gpio_cfg(); |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 1059 | } |
| 1060 | |
| 1061 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1062 | if (machine_is_msm7627a_qrd1()) { |
| 1063 | qrd1_camera_gpio_cfg(); |
| 1064 | platform_add_devices(camera_devices_qrd, |
| 1065 | ARRAY_SIZE(camera_devices_qrd)); |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 1066 | } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) { |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1067 | platform_add_devices(camera_devices_evb, |
| 1068 | ARRAY_SIZE(camera_devices_evb)); |
| 1069 | } else if (machine_is_msm7627a_qrd3()) |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 1070 | return; |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1071 | else |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1072 | platform_add_devices(camera_devices_msm, |
| 1073 | ARRAY_SIZE(camera_devices_msm)); |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 1074 | #endif |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 1075 | if (!machine_is_msm7627a_qrd1() || !machine_is_msm7627a_evb() |
| 1076 | || !machine_is_msm8625_evb()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1077 | register_i2c_devices(); |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1078 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1079 | rc = regulator_bulk_get(NULL, ARRAY_SIZE(regs_camera), regs_camera); |
| 1080 | |
| 1081 | if (rc) { |
| 1082 | pr_err("%s: could not get regulators: %d\n", __func__, rc); |
| 1083 | return; |
| 1084 | } |
| 1085 | |
| 1086 | rc = regulator_bulk_set_voltage(ARRAY_SIZE(regs_camera), regs_camera); |
| 1087 | |
| 1088 | if (rc) { |
| 1089 | pr_err("%s: could not set voltages: %d\n", __func__, rc); |
| 1090 | return; |
| 1091 | } |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1092 | #endif |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1093 | |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 1094 | #if defined(CONFIG_MSM_CAMERA_V4L2) |
| 1095 | msm7x27a_init_cam(); |
| 1096 | #endif |
| 1097 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1098 | if (machine_is_msm7627a_qrd1()) { |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1099 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 1100 | i2c_camera_devices_qrd, |
| 1101 | ARRAY_SIZE(i2c_camera_devices_qrd)); |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 1102 | } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb()) { |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1103 | pr_debug("machine_is_msm7627a_evb i2c_register_board_info\n"); |
| 1104 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 1105 | i2c_camera_devices_evb, |
| 1106 | ARRAY_SIZE(i2c_camera_devices_evb)); |
| 1107 | } else |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 1108 | #endif |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1109 | pr_debug("i2c_register_board_info\n"); |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1110 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 1111 | i2c_camera_devices, |
| 1112 | ARRAY_SIZE(i2c_camera_devices)); |
| 1113 | } |