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); |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame^] | 317 | if (machine_is_msm8625_surf() || machine_is_msm8625_evb() |
| 318 | || machine_is_msm8625_evt()) { |
Raju P.L.S.S.S.N | 2b34501 | 2012-03-15 10:18:30 +0530 | [diff] [blame] | 319 | platform_device_register(&msm8625_device_csic0); |
| 320 | platform_device_register(&msm8625_device_csic1); |
| 321 | } else { |
| 322 | platform_device_register(&msm7x27a_device_csic0); |
| 323 | platform_device_register(&msm7x27a_device_csic1); |
| 324 | } |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame^] | 325 | if (machine_is_msm8625_evb() || machine_is_msm8625_evt()) |
Suresh Vankadara | 6050cef5 | 2012-04-16 21:44:59 +0530 | [diff] [blame] | 326 | *(int *) msm7x27a_device_clkctl.dev.platform_data = 1; |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 327 | platform_device_register(&msm7x27a_device_clkctl); |
| 328 | platform_device_register(&msm7x27a_device_vfe); |
| 329 | } |
| 330 | |
| 331 | static struct i2c_board_info i2c_camera_devices[] = { |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 332 | { |
| 333 | I2C_BOARD_INFO("s5k4e1", 0x36), |
| 334 | .platform_data = &msm_camera_sensor_s5k4e1_data, |
| 335 | }, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 336 | { |
| 337 | I2C_BOARD_INFO("ov9726", 0x10), |
| 338 | .platform_data = &msm_camera_sensor_ov9726_data, |
| 339 | }, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 340 | { |
| 341 | I2C_BOARD_INFO("mt9e013", 0x6C >> 2), |
| 342 | .platform_data = &msm_camera_sensor_mt9e013_data, |
| 343 | }, |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 344 | { |
| 345 | I2C_BOARD_INFO("ov7692", 0x78), |
| 346 | .platform_data = &msm_camera_sensor_ov7692_data, |
| 347 | }, |
| 348 | { |
| 349 | I2C_BOARD_INFO("ov5647", 0x36 << 1), |
| 350 | .platform_data = &msm_camera_sensor_ov5647_data, |
| 351 | }, |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 352 | { |
| 353 | I2C_BOARD_INFO("sc628a", 0x6E), |
| 354 | }, |
| 355 | }; |
| 356 | #else |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 357 | static uint32_t camera_off_gpio_table[] = { |
| 358 | GPIO_CFG(15, 0, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), |
| 359 | }; |
| 360 | |
| 361 | static uint32_t camera_on_gpio_table[] = { |
| 362 | GPIO_CFG(15, 1, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), |
| 363 | }; |
| 364 | |
| 365 | #ifdef CONFIG_MSM_CAMERA_FLASH |
| 366 | static struct msm_camera_sensor_flash_src msm_flash_src = { |
| 367 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_EXT, |
| 368 | ._fsrc.ext_driver_src.led_en = GPIO_CAM_GP_LED_EN1, |
| 369 | ._fsrc.ext_driver_src.led_flash_en = GPIO_CAM_GP_LED_EN2, |
| 370 | }; |
| 371 | #endif |
| 372 | |
| 373 | static struct regulator_bulk_data regs_camera[] = { |
| 374 | { .supply = "msme1", .min_uV = 1800000, .max_uV = 1800000 }, |
| 375 | { .supply = "gp2", .min_uV = 2850000, .max_uV = 2850000 }, |
| 376 | { .supply = "usb2", .min_uV = 1800000, .max_uV = 1800000 }, |
| 377 | }; |
| 378 | |
| 379 | static void qrd1_camera_gpio_cfg(void) |
| 380 | { |
| 381 | |
| 382 | int rc = 0; |
| 383 | |
| 384 | rc = gpio_request(QRD_GPIO_CAM_5MP_SHDN_EN, "ov5640"); |
| 385 | if (rc < 0) |
| 386 | pr_err("%s: gpio_request---GPIO_CAM_5MP_SHDN_EN failed!", |
| 387 | __func__); |
| 388 | |
| 389 | |
| 390 | rc = gpio_tlmm_config(GPIO_CFG(QRD_GPIO_CAM_5MP_SHDN_EN, 0, |
| 391 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, |
| 392 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 393 | if (rc < 0) { |
| 394 | pr_err("%s: unable to enable Power Down gpio for main" |
| 395 | "camera!\n", __func__); |
| 396 | gpio_free(QRD_GPIO_CAM_5MP_SHDN_EN); |
| 397 | } |
| 398 | |
| 399 | |
| 400 | rc = gpio_request(QRD_GPIO_CAM_5MP_RESET, "ov5640"); |
| 401 | if (rc < 0) { |
| 402 | pr_err("%s: gpio_request---GPIO_CAM_5MP_RESET failed!", |
| 403 | __func__); |
| 404 | gpio_free(QRD_GPIO_CAM_5MP_SHDN_EN); |
| 405 | } |
| 406 | |
| 407 | |
| 408 | rc = gpio_tlmm_config(GPIO_CFG(QRD_GPIO_CAM_5MP_RESET, 0, |
| 409 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, |
| 410 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 411 | if (rc < 0) { |
| 412 | pr_err("%s: unable to enable reset gpio for main camera!\n", |
| 413 | __func__); |
| 414 | gpio_free(QRD_GPIO_CAM_5MP_RESET); |
| 415 | } |
| 416 | |
| 417 | rc = gpio_request(QRD_GPIO_CAM_3MP_PWDN, "ov7692"); |
| 418 | if (rc < 0) |
| 419 | pr_err("%s: gpio_request---GPIO_CAM_3MP_PWDN failed!", |
| 420 | __func__); |
| 421 | |
| 422 | rc = gpio_tlmm_config(GPIO_CFG(QRD_GPIO_CAM_3MP_PWDN, 0, |
| 423 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_UP, |
| 424 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 425 | if (rc < 0) { |
| 426 | pr_err("%s: unable to enable Power Down gpio for front" |
| 427 | "camera!\n", __func__); |
| 428 | gpio_free(QRD_GPIO_CAM_3MP_PWDN); |
| 429 | } |
| 430 | |
| 431 | gpio_direction_output(QRD_GPIO_CAM_5MP_SHDN_EN, 1); |
| 432 | gpio_direction_output(QRD_GPIO_CAM_5MP_RESET, 1); |
| 433 | gpio_direction_output(QRD_GPIO_CAM_3MP_PWDN, 1); |
| 434 | } |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 435 | #endif |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 436 | |
| 437 | static void evb_camera_gpio_cfg(void) |
| 438 | { |
| 439 | int rc = 0; |
| 440 | |
| 441 | rc = gpio_request(GPIO_SKU3_CAM_5MP_SHDN_N, "ov5647"); |
| 442 | if (rc < 0) |
| 443 | pr_err("%s: gpio_request GPIO_SKU3_CAM_5MP_SHDN_N failed!", |
| 444 | __func__); |
| 445 | |
| 446 | pr_debug("gpio_tlmm_config %d\r\n", GPIO_SKU3_CAM_5MP_SHDN_N); |
| 447 | rc = gpio_tlmm_config(GPIO_CFG(GPIO_SKU3_CAM_5MP_SHDN_N, 0, |
| 448 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 449 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 450 | if (rc < 0) { |
| 451 | pr_err("%s:unable to enable Powr Dwn gpio for main camera!\n", |
| 452 | __func__); |
| 453 | gpio_free(GPIO_SKU3_CAM_5MP_SHDN_N); |
| 454 | } |
| 455 | |
| 456 | gpio_direction_output(GPIO_SKU3_CAM_5MP_SHDN_N, 1); |
| 457 | |
| 458 | rc = gpio_request(GPIO_SKU3_CAM_5MP_CAMIF_RESET, "ov5647"); |
| 459 | if (rc < 0) |
| 460 | pr_err("%s: gpio_request GPIO_SKU3_CAM_5MP_CAMIF_RESET failed!", |
| 461 | __func__); |
| 462 | |
| 463 | pr_debug("gpio_tlmm_config %d\r\n", GPIO_SKU3_CAM_5MP_CAMIF_RESET); |
| 464 | rc = gpio_tlmm_config(GPIO_CFG(GPIO_SKU3_CAM_5MP_CAMIF_RESET, 0, |
| 465 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 466 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 467 | if (rc < 0) { |
| 468 | pr_err("%s: unable to enable reset gpio for main camera!\n", |
| 469 | __func__); |
| 470 | gpio_free(GPIO_SKU3_CAM_5MP_CAMIF_RESET); |
| 471 | } |
| 472 | |
| 473 | gpio_direction_output(GPIO_SKU3_CAM_5MP_CAMIF_RESET, 1); |
| 474 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 475 | } |
| 476 | |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 477 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
| 478 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 479 | static void msm_camera_vreg_config(int vreg_en) |
| 480 | { |
| 481 | int rc = vreg_en ? |
| 482 | regulator_bulk_enable(ARRAY_SIZE(regs_camera), regs_camera) : |
| 483 | regulator_bulk_disable(ARRAY_SIZE(regs_camera), regs_camera); |
| 484 | |
| 485 | if (rc) |
| 486 | pr_err("%s: could not %sable regulators: %d\n", |
| 487 | __func__, vreg_en ? "en" : "dis", rc); |
| 488 | } |
| 489 | |
| 490 | static int config_gpio_table(uint32_t *table, int len) |
| 491 | { |
| 492 | int rc = 0, i = 0; |
| 493 | |
| 494 | for (i = 0; i < len; i++) { |
| 495 | rc = gpio_tlmm_config(table[i], GPIO_CFG_ENABLE); |
| 496 | if (rc) { |
| 497 | pr_err("%s not able to get gpio\n", __func__); |
| 498 | for (i--; i >= 0; i--) |
| 499 | gpio_tlmm_config(camera_off_gpio_table[i], |
| 500 | GPIO_CFG_ENABLE); |
| 501 | break; |
| 502 | } |
| 503 | } |
| 504 | return rc; |
| 505 | } |
| 506 | |
| 507 | static int config_camera_on_gpios_rear(void) |
| 508 | { |
| 509 | int rc = 0; |
| 510 | |
| 511 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 512 | || machine_is_msm7627a_qrd1() |
| 513 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 514 | msm_camera_vreg_config(1); |
| 515 | |
| 516 | rc = config_gpio_table(camera_on_gpio_table, |
| 517 | ARRAY_SIZE(camera_on_gpio_table)); |
| 518 | if (rc < 0) { |
| 519 | pr_err("%s: CAMSENSOR gpio table request" |
| 520 | "failed\n", __func__); |
| 521 | return rc; |
| 522 | } |
| 523 | |
| 524 | return rc; |
| 525 | } |
| 526 | |
| 527 | static void config_camera_off_gpios_rear(void) |
| 528 | { |
| 529 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 530 | || machine_is_msm7627a_qrd1() |
| 531 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 532 | msm_camera_vreg_config(0); |
| 533 | |
| 534 | config_gpio_table(camera_off_gpio_table, |
| 535 | ARRAY_SIZE(camera_off_gpio_table)); |
| 536 | } |
| 537 | |
| 538 | static int config_camera_on_gpios_front(void) |
| 539 | { |
| 540 | int rc = 0; |
| 541 | |
| 542 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 543 | || machine_is_msm7627a_qrd1() |
| 544 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 545 | msm_camera_vreg_config(1); |
| 546 | |
| 547 | rc = config_gpio_table(camera_on_gpio_table, |
| 548 | ARRAY_SIZE(camera_on_gpio_table)); |
| 549 | if (rc < 0) { |
| 550 | pr_err("%s: CAMSENSOR gpio table request" |
| 551 | "failed\n", __func__); |
| 552 | return rc; |
| 553 | } |
| 554 | |
| 555 | return rc; |
| 556 | } |
| 557 | |
| 558 | static void config_camera_off_gpios_front(void) |
| 559 | { |
| 560 | if (machine_is_msm7x27a_ffa() || machine_is_msm7625a_ffa() |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 561 | || machine_is_msm7627a_qrd1() |
| 562 | || machine_is_msm8625_ffa()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 563 | msm_camera_vreg_config(0); |
| 564 | |
| 565 | config_gpio_table(camera_off_gpio_table, |
| 566 | ARRAY_SIZE(camera_off_gpio_table)); |
| 567 | } |
| 568 | |
| 569 | struct msm_camera_device_platform_data msm_camera_device_data_rear = { |
| 570 | .camera_gpio_on = config_camera_on_gpios_rear, |
| 571 | .camera_gpio_off = config_camera_off_gpios_rear, |
| 572 | .ioext.csiphy = 0xA1000000, |
| 573 | .ioext.csisz = 0x00100000, |
| 574 | .ioext.csiirq = INT_CSI_IRQ_1, |
| 575 | .ioclk.mclk_clk_rate = 24000000, |
| 576 | .ioclk.vfe_clk_rate = 192000000, |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 577 | .ioext.appphy = MSM7XXX_CLK_CTL_PHYS, |
| 578 | .ioext.appsz = MSM7XXX_CLK_CTL_SIZE, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 579 | }; |
| 580 | |
| 581 | struct msm_camera_device_platform_data msm_camera_device_data_front = { |
| 582 | .camera_gpio_on = config_camera_on_gpios_front, |
| 583 | .camera_gpio_off = config_camera_off_gpios_front, |
| 584 | .ioext.csiphy = 0xA0F00000, |
| 585 | .ioext.csisz = 0x00100000, |
| 586 | .ioext.csiirq = INT_CSI_IRQ_0, |
| 587 | .ioclk.mclk_clk_rate = 24000000, |
| 588 | .ioclk.vfe_clk_rate = 192000000, |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 589 | .ioext.appphy = MSM7XXX_CLK_CTL_PHYS, |
| 590 | .ioext.appsz = MSM7XXX_CLK_CTL_SIZE, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 591 | }; |
| 592 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 593 | #ifdef CONFIG_OV5647 |
| 594 | |
| 595 | static struct msm_camera_sensor_platform_info ov5647_sensor_7627a_info = { |
| 596 | .mount_angle = 90 |
| 597 | }; |
| 598 | |
| 599 | static struct msm_camera_sensor_flash_src msm_flash_src_ov5647 = { |
| 600 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_LED, |
| 601 | ._fsrc.led_src.led_name = "flashlight", |
| 602 | ._fsrc.led_src.led_name_len = 10, |
| 603 | }; |
| 604 | |
| 605 | static struct msm_camera_sensor_flash_data flash_ov5647 = { |
| 606 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 607 | .flash_src = &msm_flash_src_ov5647, |
| 608 | }; |
| 609 | |
| 610 | static struct msm_camera_sensor_info msm_camera_sensor_ov5647_data = { |
| 611 | .sensor_name = "ov5647", |
| 612 | .sensor_reset_enable = 1, |
| 613 | .sensor_reset = GPIO_SKU3_CAM_5MP_CAMIF_RESET, |
| 614 | .pmic_gpio_enable = 1, |
| 615 | .sensor_pwd = GPIO_SKU3_CAM_5MP_SHDN_N, |
| 616 | .vcm_pwd = GPIO_SKU3_CAM_5MP_CAM_DRIVER_PWDN, |
Lokesh Kumar Aakulu | fe9c3ec | 2012-02-22 19:26:29 +0530 | [diff] [blame] | 617 | .vcm_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 618 | .pdata = &msm_camera_device_data_rear, |
| 619 | .flash_data = &flash_ov5647, |
| 620 | .sensor_platform_info = &ov5647_sensor_7627a_info, |
| 621 | .csi_if = 1 |
| 622 | }; |
| 623 | |
| 624 | static struct platform_device msm_camera_sensor_ov5647 = { |
| 625 | .name = "msm_camera_ov5647", |
| 626 | .dev = { |
| 627 | .platform_data = &msm_camera_sensor_ov5647_data, |
| 628 | }, |
| 629 | }; |
| 630 | #endif |
| 631 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 632 | #ifdef CONFIG_S5K4E1 |
| 633 | static struct msm_camera_sensor_platform_info s5k4e1_sensor_7627a_info = { |
| 634 | .mount_angle = 90 |
| 635 | }; |
| 636 | |
| 637 | static struct msm_camera_sensor_flash_data flash_s5k4e1 = { |
| 638 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 639 | .flash_src = &msm_flash_src |
| 640 | }; |
| 641 | |
| 642 | static struct msm_camera_sensor_info msm_camera_sensor_s5k4e1_data = { |
| 643 | .sensor_name = "s5k4e1", |
| 644 | .sensor_reset_enable = 1, |
| 645 | .sensor_reset = GPIO_CAM_GP_CAMIF_RESET_N, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 646 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 647 | .sensor_pwd = 85, |
| 648 | .vcm_pwd = GPIO_CAM_GP_CAM_PWDN, |
| 649 | .vcm_enable = 1, |
| 650 | .pdata = &msm_camera_device_data_rear, |
| 651 | .flash_data = &flash_s5k4e1, |
| 652 | .sensor_platform_info = &s5k4e1_sensor_7627a_info, |
| 653 | .csi_if = 1 |
| 654 | }; |
| 655 | |
| 656 | static struct platform_device msm_camera_sensor_s5k4e1 = { |
| 657 | .name = "msm_camera_s5k4e1", |
| 658 | .dev = { |
| 659 | .platform_data = &msm_camera_sensor_s5k4e1_data, |
| 660 | }, |
| 661 | }; |
| 662 | #endif |
| 663 | |
| 664 | #ifdef CONFIG_IMX072 |
| 665 | static struct msm_camera_sensor_platform_info imx072_sensor_7627a_info = { |
| 666 | .mount_angle = 90 |
| 667 | }; |
| 668 | |
| 669 | static struct msm_camera_sensor_flash_data flash_imx072 = { |
| 670 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 671 | .flash_src = &msm_flash_src |
| 672 | }; |
| 673 | |
| 674 | static struct msm_camera_sensor_info msm_camera_sensor_imx072_data = { |
| 675 | .sensor_name = "imx072", |
| 676 | .sensor_reset_enable = 1, |
| 677 | .sensor_reset = GPIO_CAM_GP_CAMIF_RESET_N, /* TODO 106,*/ |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 678 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 679 | .sensor_pwd = 85, |
| 680 | .vcm_pwd = GPIO_CAM_GP_CAM_PWDN, |
| 681 | .vcm_enable = 1, |
| 682 | .pdata = &msm_camera_device_data_rear, |
| 683 | .flash_data = &flash_imx072, |
| 684 | .sensor_platform_info = &imx072_sensor_7627a_info, |
| 685 | .csi_if = 1 |
| 686 | }; |
| 687 | |
| 688 | static struct platform_device msm_camera_sensor_imx072 = { |
| 689 | .name = "msm_camera_imx072", |
| 690 | .dev = { |
| 691 | .platform_data = &msm_camera_sensor_imx072_data, |
| 692 | }, |
| 693 | }; |
| 694 | #endif |
| 695 | |
| 696 | static struct msm_camera_sensor_info msm_camera_sensor_ov9726_data; |
| 697 | #ifdef CONFIG_WEBCAM_OV9726 |
| 698 | static struct msm_camera_sensor_platform_info ov9726_sensor_7627a_info = { |
| 699 | .mount_angle = 90 |
| 700 | }; |
| 701 | |
| 702 | static struct msm_camera_sensor_flash_data flash_ov9726 = { |
| 703 | .flash_type = MSM_CAMERA_FLASH_NONE, |
| 704 | .flash_src = &msm_flash_src |
| 705 | }; |
| 706 | |
| 707 | static struct msm_camera_sensor_info msm_camera_sensor_ov9726_data = { |
| 708 | .sensor_name = "ov9726", |
| 709 | .sensor_reset_enable = 0, |
| 710 | .sensor_reset = GPIO_CAM_GP_CAM1MP_XCLR, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 711 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 712 | .sensor_pwd = 85, |
| 713 | .vcm_pwd = 1, |
| 714 | .vcm_enable = 0, |
| 715 | .pdata = &msm_camera_device_data_front, |
| 716 | .flash_data = &flash_ov9726, |
| 717 | .sensor_platform_info = &ov9726_sensor_7627a_info, |
| 718 | .csi_if = 1 |
| 719 | }; |
| 720 | |
| 721 | static struct platform_device msm_camera_sensor_ov9726 = { |
| 722 | .name = "msm_camera_ov9726", |
| 723 | .dev = { |
| 724 | .platform_data = &msm_camera_sensor_ov9726_data, |
| 725 | }, |
| 726 | }; |
| 727 | #else |
| 728 | static inline void msm_camera_vreg_init(void) { } |
| 729 | #endif |
| 730 | |
| 731 | #ifdef CONFIG_MT9E013 |
| 732 | static struct msm_camera_sensor_platform_info mt9e013_sensor_7627a_info = { |
| 733 | .mount_angle = 90 |
| 734 | }; |
| 735 | |
| 736 | static struct msm_camera_sensor_flash_data flash_mt9e013 = { |
| 737 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 738 | .flash_src = &msm_flash_src |
| 739 | }; |
| 740 | |
| 741 | static struct msm_camera_sensor_info msm_camera_sensor_mt9e013_data = { |
| 742 | .sensor_name = "mt9e013", |
| 743 | .sensor_reset = 0, |
| 744 | .sensor_reset_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 745 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 746 | .sensor_pwd = 85, |
| 747 | .vcm_pwd = 1, |
| 748 | .vcm_enable = 0, |
| 749 | .pdata = &msm_camera_device_data_rear, |
| 750 | .flash_data = &flash_mt9e013, |
| 751 | .sensor_platform_info = &mt9e013_sensor_7627a_info, |
| 752 | .csi_if = 1 |
| 753 | }; |
| 754 | |
| 755 | static struct platform_device msm_camera_sensor_mt9e013 = { |
| 756 | .name = "msm_camera_mt9e013", |
| 757 | .dev = { |
| 758 | .platform_data = &msm_camera_sensor_mt9e013_data, |
| 759 | }, |
| 760 | }; |
| 761 | #endif |
| 762 | |
| 763 | #ifdef CONFIG_OV5640 |
| 764 | static struct msm_camera_sensor_platform_info ov5640_sensor_info = { |
| 765 | .mount_angle = 90 |
| 766 | }; |
| 767 | |
| 768 | static struct msm_camera_sensor_flash_src msm_flash_src_ov5640 = { |
| 769 | .flash_sr_type = MSM_CAMERA_FLASH_SRC_LED, |
| 770 | ._fsrc.led_src.led_name = "flashlight", |
| 771 | ._fsrc.led_src.led_name_len = 10, |
| 772 | }; |
| 773 | |
| 774 | static struct msm_camera_sensor_flash_data flash_ov5640 = { |
| 775 | .flash_type = MSM_CAMERA_FLASH_LED, |
| 776 | .flash_src = &msm_flash_src_ov5640, |
| 777 | }; |
| 778 | |
| 779 | static struct msm_camera_sensor_info msm_camera_sensor_ov5640_data = { |
| 780 | .sensor_name = "ov5640", |
| 781 | .sensor_reset_enable = 1, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 782 | .pmic_gpio_enable = 0, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 783 | .sensor_reset = QRD_GPIO_CAM_5MP_RESET, |
| 784 | .sensor_pwd = QRD_GPIO_CAM_5MP_SHDN_EN, |
| 785 | .vcm_pwd = 0, |
| 786 | .vcm_enable = 0, |
| 787 | .pdata = &msm_camera_device_data_rear, |
| 788 | .flash_data = &flash_ov5640, |
| 789 | .sensor_platform_info = &ov5640_sensor_info, |
| 790 | .csi_if = 1, |
| 791 | }; |
| 792 | |
| 793 | static struct platform_device msm_camera_sensor_ov5640 = { |
| 794 | .name = "msm_camera_ov5640", |
| 795 | .dev = { |
| 796 | .platform_data = &msm_camera_sensor_ov5640_data, |
| 797 | }, |
| 798 | }; |
| 799 | #endif |
| 800 | |
| 801 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 802 | static struct msm_camera_sensor_platform_info ov7692_sensor_7627a_info = { |
| 803 | .mount_angle = 90 |
| 804 | }; |
| 805 | |
| 806 | static struct msm_camera_sensor_flash_data flash_ov7692 = { |
| 807 | .flash_type = MSM_CAMERA_FLASH_NONE, |
| 808 | }; |
| 809 | |
| 810 | static struct msm_camera_sensor_info msm_camera_sensor_ov7692_data = { |
| 811 | .sensor_name = "ov7692", |
| 812 | .sensor_reset_enable = 0, |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 813 | .pmic_gpio_enable = 1, |
| 814 | .sensor_reset = GPIO_SKU1_CAM_VGA_RESET_N, |
| 815 | .sensor_pwd = GPIO_SKU1_CAM_VGA_SHDN, |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 816 | .vcm_pwd = 0, |
| 817 | .vcm_enable = 0, |
| 818 | .pdata = &msm_camera_device_data_front, |
| 819 | .flash_data = &flash_ov7692, |
| 820 | .sensor_platform_info = &ov7692_sensor_7627a_info, |
| 821 | .csi_if = 1, |
| 822 | }; |
| 823 | |
| 824 | static struct platform_device msm_camera_sensor_ov7692 = { |
| 825 | .name = "msm_camera_ov7692", |
| 826 | .dev = { |
| 827 | .platform_data = &msm_camera_sensor_ov7692_data, |
| 828 | }, |
| 829 | }; |
| 830 | #endif |
| 831 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 832 | static struct i2c_board_info i2c_camera_devices[] = { |
| 833 | #ifdef CONFIG_S5K4E1 |
| 834 | { |
| 835 | I2C_BOARD_INFO("s5k4e1", 0x36), |
| 836 | }, |
| 837 | { |
| 838 | I2C_BOARD_INFO("s5k4e1_af", 0x8c >> 1), |
| 839 | }, |
| 840 | #endif |
| 841 | #ifdef CONFIG_WEBCAM_OV9726 |
| 842 | { |
| 843 | I2C_BOARD_INFO("ov9726", 0x10), |
| 844 | }, |
| 845 | #endif |
| 846 | #ifdef CONFIG_IMX072 |
| 847 | { |
| 848 | I2C_BOARD_INFO("imx072", 0x34), |
| 849 | }, |
| 850 | #endif |
| 851 | #ifdef CONFIG_MT9E013 |
| 852 | { |
| 853 | I2C_BOARD_INFO("mt9e013", 0x6C >> 2), |
| 854 | }, |
| 855 | #endif |
| 856 | { |
| 857 | I2C_BOARD_INFO("sc628a", 0x6E), |
| 858 | }, |
| 859 | }; |
| 860 | |
| 861 | static struct i2c_board_info i2c_camera_devices_qrd[] = { |
| 862 | #ifdef CONFIG_OV5640 |
| 863 | { |
| 864 | I2C_BOARD_INFO("ov5640", 0x78 >> 1), |
| 865 | }, |
| 866 | #endif |
| 867 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 868 | { |
| 869 | I2C_BOARD_INFO("ov7692", 0x78), |
| 870 | }, |
| 871 | #endif |
| 872 | }; |
| 873 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 874 | static struct i2c_board_info i2c_camera_devices_evb[] = { |
| 875 | #ifdef CONFIG_OV5647 |
| 876 | { |
| 877 | I2C_BOARD_INFO("ov5647", 0x36 << 1), |
| 878 | }, |
| 879 | { |
| 880 | I2C_BOARD_INFO("ov5647_af", 0x18 >> 1), |
| 881 | }, |
| 882 | #endif |
| 883 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 884 | { |
| 885 | I2C_BOARD_INFO("ov7692", 0x78), |
| 886 | }, |
| 887 | #endif |
| 888 | }; |
| 889 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 890 | static struct platform_device *camera_devices_msm[] __initdata = { |
| 891 | #ifdef CONFIG_S5K4E1 |
| 892 | &msm_camera_sensor_s5k4e1, |
| 893 | #endif |
| 894 | #ifdef CONFIG_IMX072 |
| 895 | &msm_camera_sensor_imx072, |
| 896 | #endif |
| 897 | #ifdef CONFIG_WEBCAM_OV9726 |
| 898 | &msm_camera_sensor_ov9726, |
| 899 | #endif |
| 900 | #ifdef CONFIG_MT9E013 |
| 901 | &msm_camera_sensor_mt9e013, |
| 902 | #endif |
| 903 | }; |
| 904 | |
| 905 | static struct platform_device *camera_devices_qrd[] __initdata = { |
| 906 | #ifdef CONFIG_OV5640 |
| 907 | &msm_camera_sensor_ov5640, |
| 908 | #endif |
| 909 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 910 | &msm_camera_sensor_ov7692, |
| 911 | #endif |
| 912 | }; |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 913 | |
| 914 | static struct platform_device *camera_devices_evb[] __initdata = { |
| 915 | #ifdef CONFIG_OV5647 |
| 916 | &msm_camera_sensor_ov5647, |
| 917 | #endif |
| 918 | #ifdef CONFIG_WEBCAM_OV7692_QRD |
| 919 | &msm_camera_sensor_ov7692, |
| 920 | #endif |
| 921 | }; |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 922 | #endif |
| 923 | |
| 924 | enum { |
| 925 | SX150X_CAM, |
| 926 | }; |
| 927 | |
| 928 | static struct sx150x_platform_data sx150x_data[] __initdata = { |
| 929 | [SX150X_CAM] = { |
| 930 | .gpio_base = GPIO_CAM_EXPANDER_BASE, |
| 931 | .oscio_is_gpo = false, |
| 932 | .io_pullup_ena = 0, |
| 933 | .io_pulldn_ena = 0, |
| 934 | .io_open_drain_ena = 0x23, |
| 935 | .irq_summary = -1, |
| 936 | }, |
| 937 | }; |
| 938 | |
| 939 | static struct i2c_board_info cam_exp_i2c_info[] __initdata = { |
| 940 | { |
| 941 | I2C_BOARD_INFO("sx1508q", 0x22), |
| 942 | .platform_data = &sx150x_data[SX150X_CAM], |
| 943 | }, |
| 944 | }; |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 945 | |
| 946 | static void __init register_i2c_devices(void) |
| 947 | { |
| 948 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 949 | cam_exp_i2c_info, |
| 950 | ARRAY_SIZE(cam_exp_i2c_info)); |
| 951 | } |
| 952 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 953 | #define LCD_CAMERA_LDO_2V8 35 /* SKU1&SKU3 2.8V LDO */ |
| 954 | #define SKU3_LCD_CAMERA_LDO_1V8 40 /* SKU3 1.8V LDO */ |
| 955 | |
| 956 | static int lcd_camera_ldo_1v8 = SKU3_LCD_CAMERA_LDO_1V8; |
| 957 | |
| 958 | static void lcd_camera_power_init(void) |
| 959 | { |
| 960 | int rc = 0; |
| 961 | |
| 962 | pr_debug("lcd_camera_power_init\n"); |
| 963 | |
| 964 | lcd_camera_ldo_1v8 = SKU3_LCD_CAMERA_LDO_1V8; /* SKU3 PVT */ |
| 965 | |
| 966 | /* LDO_EXT2V8 */ |
| 967 | if (gpio_request(LCD_CAMERA_LDO_2V8, "lcd_camera_ldo_2v8")) { |
| 968 | pr_err("failed to request gpio lcd_camera_ldo_2v8\n"); |
| 969 | return; |
| 970 | } |
| 971 | |
| 972 | rc = gpio_tlmm_config(GPIO_CFG(LCD_CAMERA_LDO_2V8, 0, |
| 973 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 974 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 975 | if (rc < 0) { |
| 976 | pr_err("%s: unable to enable lcd_camera_ldo_2v8!\n", __func__); |
| 977 | goto fail_gpio2; |
| 978 | } |
| 979 | |
| 980 | /* LDO_EVT1V8 */ |
| 981 | if (gpio_request(lcd_camera_ldo_1v8, "lcd_camera_ldo_1v8")) { |
| 982 | pr_err("failed to request gpio lcd_camera_ldo_1v8\n"); |
| 983 | goto fail_gpio2; |
| 984 | } |
| 985 | |
| 986 | rc = gpio_tlmm_config(GPIO_CFG(lcd_camera_ldo_1v8, 0, |
| 987 | GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, |
| 988 | GPIO_CFG_2MA), GPIO_CFG_ENABLE); |
| 989 | if (rc < 0) { |
| 990 | pr_err("%s: unable to enable lcd_camera_ldo_1v8!\n", __func__); |
| 991 | goto fail_gpio1; |
| 992 | } |
| 993 | |
| 994 | return; |
| 995 | |
| 996 | fail_gpio1: |
| 997 | gpio_free(lcd_camera_ldo_1v8); |
| 998 | fail_gpio2: |
| 999 | gpio_free(LCD_CAMERA_LDO_2V8); |
| 1000 | |
| 1001 | return; |
| 1002 | } |
| 1003 | |
| 1004 | static int lcd_camera_power_on_sku3(void) |
| 1005 | { |
| 1006 | int rc = 0; |
| 1007 | |
| 1008 | pr_debug("turn on sku3 lcd_camera_ldo_1v8\n"); |
| 1009 | gpio_set_value_cansleep(lcd_camera_ldo_1v8, 1); |
| 1010 | |
| 1011 | pr_debug("turn on sku3 lcd_camera_ldo\n"); |
| 1012 | gpio_set_value_cansleep(LCD_CAMERA_LDO_2V8, 1); |
| 1013 | |
| 1014 | return rc; |
| 1015 | } |
| 1016 | |
| 1017 | static int lcd_camera_power_off_sku3(void) |
| 1018 | { |
| 1019 | int rc = 0; |
| 1020 | |
| 1021 | pr_debug("turn off sku3 lcd_camera_ldo_1v8\n"); |
| 1022 | gpio_set_value_cansleep(lcd_camera_ldo_1v8, 0); |
| 1023 | |
| 1024 | pr_debug("turn off sku3 lcd_camera_ldo\n"); |
| 1025 | gpio_set_value_cansleep(LCD_CAMERA_LDO_2V8, 0); |
| 1026 | |
| 1027 | gpio_free(lcd_camera_ldo_1v8); |
| 1028 | gpio_free(LCD_CAMERA_LDO_2V8); |
| 1029 | |
| 1030 | return rc; |
| 1031 | } |
| 1032 | |
| 1033 | int lcd_camera_power_onoff(int on) |
| 1034 | { |
| 1035 | int rc = 0; |
| 1036 | |
| 1037 | pr_debug("lcd_camera_power_onoff on = %d,\n", on); |
| 1038 | |
| 1039 | if (on) |
| 1040 | rc = lcd_camera_power_on_sku3(); |
| 1041 | else |
| 1042 | rc = lcd_camera_power_off_sku3(); |
| 1043 | |
| 1044 | return rc; |
| 1045 | } |
| 1046 | EXPORT_SYMBOL(lcd_camera_power_onoff); |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1047 | |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1048 | void __init msm7627a_camera_init(void) |
| 1049 | { |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 1050 | |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1051 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1052 | int rc; |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 1053 | #endif |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1054 | |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1055 | pr_debug("msm7627a_camera_init Entered\n"); |
| 1056 | /* LCD and camera power (VREG & LDO) init */ |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame^] | 1057 | if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() |
| 1058 | || machine_is_msm8625_evt()) { |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1059 | lcd_camera_power_init(); |
Raju P.L.S.S.S.N | cea3151 | 2012-03-20 11:57:50 +0530 | [diff] [blame] | 1060 | evb_camera_gpio_cfg(); |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 1061 | } |
| 1062 | |
| 1063 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1064 | if (machine_is_msm7627a_qrd1()) { |
| 1065 | qrd1_camera_gpio_cfg(); |
| 1066 | platform_add_devices(camera_devices_qrd, |
| 1067 | ARRAY_SIZE(camera_devices_qrd)); |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame^] | 1068 | } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() |
| 1069 | || machine_is_msm8625_evt()) { |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1070 | platform_add_devices(camera_devices_evb, |
| 1071 | ARRAY_SIZE(camera_devices_evb)); |
| 1072 | } else if (machine_is_msm7627a_qrd3()) |
Chintan Pandya | b1bad0e | 2012-02-06 19:04:51 +0530 | [diff] [blame] | 1073 | return; |
Taniya Das | c868a2e | 2012-01-03 10:18:47 +0530 | [diff] [blame] | 1074 | else |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1075 | platform_add_devices(camera_devices_msm, |
| 1076 | ARRAY_SIZE(camera_devices_msm)); |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 1077 | #endif |
Chintan Pandya | f4ad400 | 2012-02-28 19:49:03 +0530 | [diff] [blame] | 1078 | if (!machine_is_msm7627a_qrd1() || !machine_is_msm7627a_evb() |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame^] | 1079 | || !machine_is_msm8625_evb() |
| 1080 | || !machine_is_msm8625_evt()) |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1081 | register_i2c_devices(); |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1082 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1083 | rc = regulator_bulk_get(NULL, ARRAY_SIZE(regs_camera), regs_camera); |
| 1084 | |
| 1085 | if (rc) { |
| 1086 | pr_err("%s: could not get regulators: %d\n", __func__, rc); |
| 1087 | return; |
| 1088 | } |
| 1089 | |
| 1090 | rc = regulator_bulk_set_voltage(ARRAY_SIZE(regs_camera), regs_camera); |
| 1091 | |
| 1092 | if (rc) { |
| 1093 | pr_err("%s: could not set voltages: %d\n", __func__, rc); |
| 1094 | return; |
| 1095 | } |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1096 | #endif |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1097 | |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 1098 | #if defined(CONFIG_MSM_CAMERA_V4L2) |
| 1099 | msm7x27a_init_cam(); |
| 1100 | #endif |
| 1101 | #ifndef CONFIG_MSM_CAMERA_V4L2 |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1102 | if (machine_is_msm7627a_qrd1()) { |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1103 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 1104 | i2c_camera_devices_qrd, |
| 1105 | ARRAY_SIZE(i2c_camera_devices_qrd)); |
Aparna Mallavarapu | 5a32624 | 2012-05-09 19:49:02 +0530 | [diff] [blame^] | 1106 | } else if (machine_is_msm7627a_evb() || machine_is_msm8625_evb() |
| 1107 | || machine_is_msm8625_evt()) { |
Su Liu | aca0470 | 2012-02-14 02:27:32 +0530 | [diff] [blame] | 1108 | pr_debug("machine_is_msm7627a_evb i2c_register_board_info\n"); |
| 1109 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 1110 | i2c_camera_devices_evb, |
| 1111 | ARRAY_SIZE(i2c_camera_devices_evb)); |
| 1112 | } else |
Suresh Vankadara | 87e195b | 2012-01-18 00:42:58 +0530 | [diff] [blame] | 1113 | #endif |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 1114 | pr_debug("i2c_register_board_info\n"); |
Chintan Pandya | 4076270 | 2011-12-06 13:47:06 +0530 | [diff] [blame] | 1115 | i2c_register_board_info(MSM_GSBI0_QUP_I2C_BUS_ID, |
| 1116 | i2c_camera_devices, |
| 1117 | ARRAY_SIZE(i2c_camera_devices)); |
| 1118 | } |