summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-ventana-sensors.c
diff options
context:
space:
mode:
authorPritesh Raithatha <praithatha@nvidia.com>2011-03-16 17:14:05 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:46:15 -0800
commitea6da0665641e64134fe6dcf48d281c5f5a06cf5 (patch)
treeb83bebca3f6f812016ca00339d55491220114301 /arch/arm/mach-tegra/board-ventana-sensors.c
parentbe9f2503cbbae683450c0e7175a39d12486d24cb (diff)
ARM: tegra: ventana: camera: corrected ifdef and func names
-using CONFIG_TEGRA_CAMERA instead of CONFIG_VIDEO_OV5650 as the code is common for all three cameras. -corrected function, struct and variable names as they were leading misunderstanding. Original-Change-Id: I9ebfc672f93ee45282b6fcf5737bb0c25c70d88b Reviewed-on: http://git-master/r/23175 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rc0b7fa95583178a07b1b9577fd67a05ea5ef2060
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana-sensors.c')
-rw-r--r--arch/arm/mach-tegra/board-ventana-sensors.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-sensors.c b/arch/arm/mach-tegra/board-ventana-sensors.c
index fbcdc6e67f0d..aaf6518d0683 100644
--- a/arch/arm/mach-tegra/board-ventana-sensors.c
+++ b/arch/arm/mach-tegra/board-ventana-sensors.c
@@ -300,42 +300,42 @@ int __init ventana_sensors_init(void)
return 0;
}
-#ifdef CONFIG_VIDEO_OV5650
+#ifdef CONFIG_TEGRA_CAMERA
-struct ov5650_gpios {
+struct tegra_camera_gpios {
const char *name;
int gpio;
int enabled;
};
-#define OV5650_GPIO(_name, _gpio, _enabled) \
+#define TEGRA_CAMERA_GPIO(_name, _gpio, _enabled) \
{ \
.name = _name, \
.gpio = _gpio, \
.enabled = _enabled, \
}
-static struct ov5650_gpios ov5650_gpio_keys[] = {
- [0] = OV5650_GPIO("en_avdd_csi", AVDD_DSI_CSI_ENB_GPIO, 1),
- [1] = OV5650_GPIO("cam_i2c_mux_rst_lo", CAM_I2C_MUX_RST_GPIO, 1),
+static struct tegra_camera_gpios ventana_camera_gpio_keys[] = {
+ [0] = TEGRA_CAMERA_GPIO("en_avdd_csi", AVDD_DSI_CSI_ENB_GPIO, 1),
+ [1] = TEGRA_CAMERA_GPIO("cam_i2c_mux_rst_lo", CAM_I2C_MUX_RST_GPIO, 1),
- [2] = OV5650_GPIO("cam2_ldo_shdn_lo", CAM2_LDO_SHUTDN_L_GPIO, 1),
- [3] = OV5650_GPIO("cam2_af_pwdn_lo", CAM2_AF_PWR_DN_L_GPIO, 0),
- [4] = OV5650_GPIO("cam2_pwdn", CAM2_PWR_DN_GPIO, 0),
- [5] = OV5650_GPIO("cam2_rst_lo", CAM2_RST_L_GPIO, 1),
+ [2] = TEGRA_CAMERA_GPIO("cam2_ldo_shdn_lo", CAM2_LDO_SHUTDN_L_GPIO, 1),
+ [3] = TEGRA_CAMERA_GPIO("cam2_af_pwdn_lo", CAM2_AF_PWR_DN_L_GPIO, 0),
+ [4] = TEGRA_CAMERA_GPIO("cam2_pwdn", CAM2_PWR_DN_GPIO, 0),
+ [5] = TEGRA_CAMERA_GPIO("cam2_rst_lo", CAM2_RST_L_GPIO, 1),
- [6] = OV5650_GPIO("cam3_ldo_shdn_lo", CAM3_LDO_SHUTDN_L_GPIO, 1),
- [7] = OV5650_GPIO("cam3_af_pwdn_lo", CAM3_AF_PWR_DN_L_GPIO, 0),
- [8] = OV5650_GPIO("cam3_pwdn", CAM3_PWR_DN_GPIO, 0),
- [9] = OV5650_GPIO("cam3_rst_lo", CAM3_RST_L_GPIO, 1),
+ [6] = TEGRA_CAMERA_GPIO("cam3_ldo_shdn_lo", CAM3_LDO_SHUTDN_L_GPIO, 1),
+ [7] = TEGRA_CAMERA_GPIO("cam3_af_pwdn_lo", CAM3_AF_PWR_DN_L_GPIO, 0),
+ [8] = TEGRA_CAMERA_GPIO("cam3_pwdn", CAM3_PWR_DN_GPIO, 0),
+ [9] = TEGRA_CAMERA_GPIO("cam3_rst_lo", CAM3_RST_L_GPIO, 1),
- [10] = OV5650_GPIO("cam1_ldo_shdn_lo", CAM1_LDO_SHUTDN_L_GPIO, 1),
- [11] = OV5650_GPIO("cam1_af_pwdn_lo", CAM1_AF_PWR_DN_L_GPIO, 0),
- [12] = OV5650_GPIO("cam1_pwdn", CAM1_PWR_DN_GPIO, 0),
- [13] = OV5650_GPIO("cam1_rst_lo", CAM1_RST_L_GPIO, 1),
+ [10] = TEGRA_CAMERA_GPIO("cam1_ldo_shdn_lo", CAM1_LDO_SHUTDN_L_GPIO, 1),
+ [11] = TEGRA_CAMERA_GPIO("cam1_af_pwdn_lo", CAM1_AF_PWR_DN_L_GPIO, 0),
+ [12] = TEGRA_CAMERA_GPIO("cam1_pwdn", CAM1_PWR_DN_GPIO, 0),
+ [13] = TEGRA_CAMERA_GPIO("cam1_rst_lo", CAM1_RST_L_GPIO, 1),
};
-int __init ventana_ov5650_late_init(void)
+int __init ventana_camera_late_init(void)
{
int ret;
int i;
@@ -364,17 +364,17 @@ int __init ventana_ov5650_late_init(void)
i2c_new_device(i2c_get_adapter(3), ventana_i2c3_board_info_tca6416);
- for (i = 0; i < ARRAY_SIZE(ov5650_gpio_keys); i++) {
- ret = gpio_request(ov5650_gpio_keys[i].gpio,
- ov5650_gpio_keys[i].name);
+ for (i = 0; i < ARRAY_SIZE(ventana_camera_gpio_keys); i++) {
+ ret = gpio_request(ventana_camera_gpio_keys[i].gpio,
+ ventana_camera_gpio_keys[i].name);
if (ret < 0) {
pr_err("%s: gpio_request failed for gpio #%d\n",
__func__, i);
goto fail_free_gpio;
}
- gpio_direction_output(ov5650_gpio_keys[i].gpio,
- ov5650_gpio_keys[i].enabled);
- gpio_export(ov5650_gpio_keys[i].gpio, false);
+ gpio_direction_output(ventana_camera_gpio_keys[i].gpio,
+ ventana_camera_gpio_keys[i].enabled);
+ gpio_export(ventana_camera_gpio_keys[i].gpio, false);
}
i2c_new_device(i2c_get_adapter(3), ventana_i2c3_board_info_pca9546);
@@ -393,13 +393,13 @@ int __init ventana_ov5650_late_init(void)
fail_free_gpio:
while (i--)
- gpio_free(ov5650_gpio_keys[i].gpio);
+ gpio_free(ventana_camera_gpio_keys[i].gpio);
fail_put_regulator:
regulator_put(cam_ldo6);
return ret;
}
-late_initcall(ventana_ov5650_late_init);
+late_initcall(ventana_camera_late_init);
-#endif /* CONFIG_VIDEO_OV5650 */
+#endif /* CONFIG_TEGRA_CAMERA */