#include <linux/i2c/pxa-i2c.h>
 #include <linux/pwm_backlight.h>
 
+#include <media/mt9v022.h>
 #include <media/soc_camera.h>
 
 #include <linux/platform_data/camera-pxa.h>
        },
 };
 
+static struct mt9v022_platform_data mt9v022_pdata = {
+       .y_skip_top = 1,
+};
+
 static struct i2c_board_info pcm990_camera_i2c[] = {
        {
                I2C_BOARD_INFO("mt9v022", 0x48),
        {
                .bus_id                 = 0, /* Must match with the camera ID */
                .board_info             = &pcm990_camera_i2c[0],
+               .priv                   = &mt9v022_pdata,
                .i2c_adapter_id         = 0,
                .query_bus_param        = pcm990_camera_query_bus_param,
                .set_bus_param          = pcm990_camera_set_bus_param,
 
 #include <linux/log2.h>
 #include <linux/module.h>
 
+#include <media/mt9v022.h>
 #include <media/soc_camera.h>
 #include <media/soc_mediabus.h>
 #include <media/v4l2-subdev.h>
        struct mt9v022 *mt9v022;
        struct soc_camera_link *icl = soc_camera_i2c_to_link(client);
        struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
+       struct mt9v022_platform_data *pdata = icl->priv;
        int ret;
 
        if (!icl) {
        mt9v022->chip_control = MT9V022_CHIP_CONTROL_DEFAULT;
 
        /*
-        * MT9V022 _really_ corrupts the first read out line.
-        * TODO: verify on i.MX31
+        * On some platforms the first read out line is corrupted.
+        * Workaround it by skipping if indicated by platform data.
         */
-       mt9v022->y_skip_top     = 1;
+       mt9v022->y_skip_top     = pdata ? pdata->y_skip_top : 0;
        mt9v022->rect.left      = MT9V022_COLUMN_SKIP;
        mt9v022->rect.top       = MT9V022_ROW_SKIP;
        mt9v022->rect.width     = MT9V022_MAX_WIDTH;
 
--- /dev/null
+/*
+ * mt9v022 sensor
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __MT9V022_H__
+#define __MT9V022_H__
+
+struct mt9v022_platform_data {
+       unsigned short y_skip_top;      /* Lines to skip at the top */
+};
+
+#endif