aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/soc_camera
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2012-09-27 18:05:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-22 08:36:50 -0500
commitb6f50b49b9712f49c377e9e3587906e27bea39d0 (patch)
tree732369ee8c06c319e0660279ba816e69521d2ace /drivers/media/i2c/soc_camera
parentd0bac768fbe274f60d41d759c76f7ba2b2e98aeb (diff)
[media] mt9v022: set y_skip_top field to zero as default
Set "y_skip_top" to zero and revise comment as I do not see this line corruption on two different mt9v022 setups. The first read-out line is perfectly fine. Add mt9v022 platform data configuring y_skip_top for platforms that have issues with the first read-out line. Set y_skip_top to 1 for pcm990 board. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/soc_camera')
-rw-r--r--drivers/media/i2c/soc_camera/mt9v022.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/i2c/soc_camera/mt9v022.c b/drivers/media/i2c/soc_camera/mt9v022.c
index 5bc5a9286fd5..84d204f82cb2 100644
--- a/drivers/media/i2c/soc_camera/mt9v022.c
+++ b/drivers/media/i2c/soc_camera/mt9v022.c
@@ -15,6 +15,7 @@
15#include <linux/log2.h> 15#include <linux/log2.h>
16#include <linux/module.h> 16#include <linux/module.h>
17 17
18#include <media/mt9v022.h>
18#include <media/soc_camera.h> 19#include <media/soc_camera.h>
19#include <media/soc_mediabus.h> 20#include <media/soc_mediabus.h>
20#include <media/v4l2-subdev.h> 21#include <media/v4l2-subdev.h>
@@ -869,6 +870,7 @@ static int mt9v022_probe(struct i2c_client *client,
869 struct mt9v022 *mt9v022; 870 struct mt9v022 *mt9v022;
870 struct soc_camera_link *icl = soc_camera_i2c_to_link(client); 871 struct soc_camera_link *icl = soc_camera_i2c_to_link(client);
871 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 872 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
873 struct mt9v022_platform_data *pdata = icl->priv;
872 int ret; 874 int ret;
873 875
874 if (!icl) { 876 if (!icl) {
@@ -932,10 +934,10 @@ static int mt9v022_probe(struct i2c_client *client,
932 mt9v022->chip_control = MT9V022_CHIP_CONTROL_DEFAULT; 934 mt9v022->chip_control = MT9V022_CHIP_CONTROL_DEFAULT;
933 935
934 /* 936 /*
935 * MT9V022 _really_ corrupts the first read out line. 937 * On some platforms the first read out line is corrupted.
936 * TODO: verify on i.MX31 938 * Workaround it by skipping if indicated by platform data.
937 */ 939 */
938 mt9v022->y_skip_top = 1; 940 mt9v022->y_skip_top = pdata ? pdata->y_skip_top : 0;
939 mt9v022->rect.left = MT9V022_COLUMN_SKIP; 941 mt9v022->rect.left = MT9V022_COLUMN_SKIP;
940 mt9v022->rect.top = MT9V022_ROW_SKIP; 942 mt9v022->rect.top = MT9V022_ROW_SKIP;
941 mt9v022->rect.width = MT9V022_MAX_WIDTH; 943 mt9v022->rect.width = MT9V022_MAX_WIDTH;