aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2009-01-15 03:52:08 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 18:20:33 -0300
commitc86da6b33f1d268483fbdbeaec0b98779d0317c1 (patch)
tree10accd6c440439589800a5ba3ff3e873bae74317
parent825f31b05bd6e92da5ef9f3ca21c5b36021f7e6e (diff)
V4L/DVB (11532): gspca - m5602-po1030: Move some code from the start vector to the init vector
This is a prepatory patch in order to support multiple resolutions for the po1030 sensor Signed-off-by: Erik Andr?n <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/m5602/m5602_po1030.h76
1 files changed, 37 insertions, 39 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.h b/drivers/media/video/gspca/m5602/m5602_po1030.h
index 98ef9d05e45..fb0accfa77a 100644
--- a/drivers/media/video/gspca/m5602/m5602_po1030.h
+++ b/drivers/media/video/gspca/m5602/m5602_po1030.h
@@ -215,40 +215,6 @@ static const unsigned char init_po1030[][3] =
{BRIDGE, M5602_XB_GPIO_DAT, 0x00},
{SENSOR, PO1030_AUTOCTRL2, 0x04},
-};
-
-static const unsigned char start_po1030[][3] =
-{
- {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
- {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
- {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
- {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
-
- {SENSOR, PO1030_AUTOCTRL2, 0x04},
-
- /* Set the width to 751 */
- {SENSOR, PO1030_FRAMEWIDTH_H, 0x02},
- {SENSOR, PO1030_FRAMEWIDTH_L, 0xef},
-
- /* Set the height to 540 */
- {SENSOR, PO1030_FRAMEHEIGHT_H, 0x02},
- {SENSOR, PO1030_FRAMEHEIGHT_L, 0x1c},
-
- /* Set the x window to 1 */
- {SENSOR, PO1030_WINDOWX_H, 0x00},
- {SENSOR, PO1030_WINDOWX_L, 0x01},
-
- /* Set the y window to 1 */
- {SENSOR, PO1030_WINDOWY_H, 0x00},
- {SENSOR, PO1030_WINDOWY_L, 0x01},
-
- /* Set the window width to 647 */
- {SENSOR, PO1030_WINDOWWIDTH_H, 0x02},
- {SENSOR, PO1030_WINDOWWIDTH_L, 0x87},
-
- /* Set the window height to 483 */
- {SENSOR, PO1030_WINDOWHEIGHT_H, 0x01},
- {SENSOR, PO1030_WINDOWHEIGHT_L, 0xe3},
{SENSOR, PO1030_OUTFORMCTRL2, PO1030_RAW_RGB_BAYER},
{SENSOR, PO1030_AUTOCTRL1, PO1030_WEIGHT_WIN_2X},
@@ -277,6 +243,43 @@ static const unsigned char start_po1030[][3] =
{SENSOR, PO1030_GC6, 0xc0},
{SENSOR, PO1030_GC7, 0xff},
+ /* Set the width to 751 */
+ {SENSOR, PO1030_FRAMEWIDTH_H, 0x02},
+ {SENSOR, PO1030_FRAMEWIDTH_L, 0xef},
+
+ /* Set the height to 540 */
+ {SENSOR, PO1030_FRAMEHEIGHT_H, 0x02},
+ {SENSOR, PO1030_FRAMEHEIGHT_L, 0x1c},
+
+ /* Set the x window to 1 */
+ {SENSOR, PO1030_WINDOWX_H, 0x00},
+ {SENSOR, PO1030_WINDOWX_L, 0x01},
+
+ /* Set the y window to 1 */
+ {SENSOR, PO1030_WINDOWY_H, 0x00},
+ {SENSOR, PO1030_WINDOWY_L, 0x01},
+
+ /* with a very low lighted environment increase the exposure but
+ * decrease the FPS (Frame Per Second) */
+ {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
+ {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
+
+ {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
+ {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
+ {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
+ {BRIDGE, M5602_XB_GPIO_EN_L, 0x00},
+};
+
+static const unsigned char start_po1030[][3] =
+{
+ /* Set the window width to 647 */
+ {SENSOR, PO1030_WINDOWWIDTH_H, 0x02},
+ {SENSOR, PO1030_WINDOWWIDTH_L, 0x87},
+
+ /* Set the window height to 483 */
+ {SENSOR, PO1030_WINDOWHEIGHT_H, 0x01},
+ {SENSOR, PO1030_WINDOWHEIGHT_L, 0xe3},
+
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06},
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
{BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
@@ -299,11 +302,6 @@ static const unsigned char start_po1030[][3] =
{BRIDGE, M5602_XB_HSYNC_PARA, 0x02},
{BRIDGE, M5602_XB_HSYNC_PARA, 0x7e},
{BRIDGE, M5602_XB_SIG_INI, 0x00},
-
- /* with a very low lighted environment increase the exposure but
- * decrease the FPS (Frame Per Second) */
- {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
- {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
};
#endif