From cb596367fe8e8f71fb5bdf14245f4a1ae6bcb0a4 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 22 Apr 2008 14:42:08 -0300 Subject: [PATCH] --- yaml --- r: 92384 b: refs/heads/master c: ef6ad5c35ed7233e7aafcc5645a1470199b10cc7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/video/Kconfig | 8 ++++---- trunk/drivers/media/video/mt9m001.c | 6 ++---- trunk/drivers/media/video/mt9v022.c | 6 ++---- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index f3aa20b6bfd0..29adab60cdf8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b4333a3baecfeee35317c03cf08952cc04bd149a +refs/heads/master: ef6ad5c35ed7233e7aafcc5645a1470199b10cc7 diff --git a/trunk/drivers/media/video/Kconfig b/trunk/drivers/media/video/Kconfig index 21f250b8cbb0..de6a6208e344 100644 --- a/trunk/drivers/media/video/Kconfig +++ b/trunk/drivers/media/video/Kconfig @@ -847,7 +847,7 @@ config SOC_CAMERA config SOC_CAMERA_MT9M001 tristate "mt9m001 support" - depends on SOC_CAMERA && GENERIC_GPIO + depends on SOC_CAMERA select GPIO_PCA953X if MT9M001_PCA9536_SWITCH help This driver supports MT9M001 cameras from Micron, monochrome @@ -855,21 +855,21 @@ config SOC_CAMERA_MT9M001 config MT9M001_PCA9536_SWITCH bool "pca9536 datawidth switch for mt9m001" - depends on SOC_CAMERA_MT9M001 + depends on SOC_CAMERA_MT9M001 && GENERIC_GPIO help Select this if your MT9M001 camera uses a PCA9536 I2C GPIO extender to switch between 8 and 10 bit datawidth modes config SOC_CAMERA_MT9V022 tristate "mt9v022 support" - depends on SOC_CAMERA && GENERIC_GPIO + depends on SOC_CAMERA select GPIO_PCA953X if MT9V022_PCA9536_SWITCH help This driver supports MT9V022 cameras from Micron config MT9V022_PCA9536_SWITCH bool "pca9536 datawidth switch for mt9v022" - depends on SOC_CAMERA_MT9V022 + depends on SOC_CAMERA_MT9V022 && GENERIC_GPIO help Select this if your MT9V022 camera uses a PCA9536 I2C GPIO extender to switch between 8 and 10 bit datawidth modes diff --git a/trunk/drivers/media/video/mt9m001.c b/trunk/drivers/media/video/mt9m001.c index b65ff7745b8d..e3afc82050af 100644 --- a/trunk/drivers/media/video/mt9m001.c +++ b/trunk/drivers/media/video/mt9m001.c @@ -17,7 +17,9 @@ #include #include +#ifdef CONFIG_MT9M001_PCA9536_SWITCH #include +#endif /* mt9m001 i2c address 0x5d * The platform has to define i2c_board_info @@ -223,10 +225,6 @@ static int mt9m001_set_capture_format(struct soc_camera_device *icd, if ((mt9m001->datawidth != 10 && (width_flag == IS_DATAWIDTH_10)) || (mt9m001->datawidth != 9 && (width_flag == IS_DATAWIDTH_9)) || (mt9m001->datawidth != 8 && (width_flag == IS_DATAWIDTH_8))) { - /* data width switch requested */ - if (!gpio_is_valid(mt9m001->switch_gpio)) - return -EINVAL; - /* Well, we actually only can do 10 or 8 bits... */ if (width_flag == IS_DATAWIDTH_9) return -EINVAL; diff --git a/trunk/drivers/media/video/mt9v022.c b/trunk/drivers/media/video/mt9v022.c index 5fbeaa305f35..468333946d57 100644 --- a/trunk/drivers/media/video/mt9v022.c +++ b/trunk/drivers/media/video/mt9v022.c @@ -18,7 +18,9 @@ #include #include +#ifdef CONFIG_MT9M001_PCA9536_SWITCH #include +#endif /* mt9v022 i2c address 0x48, 0x4c, 0x58, 0x5c * The platform has to define i2c_board_info @@ -302,10 +304,6 @@ static int mt9v022_set_capture_format(struct soc_camera_device *icd, if ((mt9v022->datawidth != 10 && (width_flag == IS_DATAWIDTH_10)) || (mt9v022->datawidth != 9 && (width_flag == IS_DATAWIDTH_9)) || (mt9v022->datawidth != 8 && (width_flag == IS_DATAWIDTH_8))) { - /* data width switch requested */ - if (!gpio_is_valid(mt9v022->switch_gpio)) - return -EINVAL; - /* Well, we actually only can do 10 or 8 bits... */ if (width_flag == IS_DATAWIDTH_9) return -EINVAL;