V4L/DVB (11549): gspca - m5602-s5k83a: Remove lots of useless init
Signed-off-by: Erik Andr?n <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
2286745de7
commit
0e7e526ac7
@ -103,8 +103,6 @@ static const unsigned char preinit_s5k83a[][4] =
|
||||
{BRIDGE, M5602_XB_GPIO_DAT_H, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_I2C_CLK_DIV, 0x20, 0x00},
|
||||
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x00, 0x00}
|
||||
};
|
||||
|
||||
/* This could probably be considerably shortened.
|
||||
@ -120,40 +118,12 @@ static const unsigned char init_s5k83a[][4] =
|
||||
{SENSOR, 0x01, 0x50, 0x00},
|
||||
{SENSOR, 0x12, 0x20, 0x00},
|
||||
{SENSOR, 0x17, 0x40, 0x00},
|
||||
{SENSOR, S5K83A_GAIN, 0x0f, 0x00},
|
||||
{SENSOR, 0x1c, 0x00, 0x00},
|
||||
{SENSOR, 0x02, 0x70, 0x00},
|
||||
{SENSOR, 0x03, 0x0b, 0x00},
|
||||
{SENSOR, 0x04, 0xf0, 0x00},
|
||||
{SENSOR, 0x05, 0x0b, 0x00},
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
{BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
|
||||
{BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
|
||||
{BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00},
|
||||
{BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0xe4, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x87, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
{SENSOR, 0x06, 0x71, 0x00},
|
||||
{SENSOR, 0x07, 0xe8, 0x00},
|
||||
{SENSOR, 0x08, 0x02, 0x00},
|
||||
@ -164,32 +134,6 @@ static const unsigned char init_s5k83a[][4] =
|
||||
{SENSOR, 0x1a, 0x98, 0x00},
|
||||
{SENSOR, 0x0f, 0x02, 0x00},
|
||||
{SENSOR, 0x10, 0xe5, 0x00},
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
{SENSOR_LONG, 0x14, 0x00, 0x20},
|
||||
{SENSOR_LONG, 0x0d, 0x00, 0x7d},
|
||||
{SENSOR_LONG, 0x1b, 0x0d, 0x05},
|
||||
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
{BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
|
||||
{BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
|
||||
{BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00},
|
||||
{BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0xe4, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x87, 0x00},
|
||||
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DIR, 0x1d, 0x00},
|
||||
@ -227,43 +171,13 @@ static const unsigned char init_s5k83a[][4] =
|
||||
{SENSOR, 0x01, 0x50, 0x00},
|
||||
{SENSOR, 0x12, 0x20, 0x00},
|
||||
{SENSOR, 0x17, 0x40, 0x00},
|
||||
{SENSOR, S5K83A_GAIN, 0x0f, 0x00},
|
||||
{SENSOR, 0x1c, 0x00, 0x00},
|
||||
{SENSOR, 0x02, 0x70, 0x00},
|
||||
/* some values like 0x10 give a blue-purple image */
|
||||
{SENSOR, 0x03, 0x0b, 0x00},
|
||||
{SENSOR, 0x04, 0xf0, 0x00},
|
||||
{SENSOR, 0x05, 0x0b, 0x00},
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
|
||||
/* under 80 don't work, highter depend on value */
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
|
||||
{BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
|
||||
{BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
|
||||
{BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x81, 0x00},
|
||||
{BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x01, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0xe4, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x7f, 0x00},
|
||||
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
{SENSOR, 0x06, 0x71, 0x00},
|
||||
{SENSOR, 0x07, 0xe8, 0x00},
|
||||
{SENSOR, 0x08, 0x02, 0x00},
|
||||
@ -274,10 +188,6 @@ static const unsigned char init_s5k83a[][4] =
|
||||
{SENSOR, 0x1a, 0x98, 0x00},
|
||||
{SENSOR, 0x0f, 0x02, 0x00},
|
||||
{SENSOR, 0x10, 0xe5, 0x00},
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
{SENSOR_LONG, 0x14, 0x00, 0x20},
|
||||
{SENSOR_LONG, 0x0d, 0x00, 0x7d},
|
||||
{SENSOR_LONG, 0x1b, 0x0d, 0x05},
|
||||
|
||||
/* The following sequence is useless after a clean boot
|
||||
but is necessary after resume from suspend */
|
||||
@ -335,7 +245,7 @@ static const unsigned char init_s5k83a[][4] =
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x01, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0xe4, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0xe4, 0x00}, /* 484 */
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_VSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
@ -343,12 +253,11 @@ static const unsigned char init_s5k83a[][4] =
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x7f, 0x00},
|
||||
{BRIDGE, M5602_XB_HSYNC_PARA, 0x7f, 0x00}, /* 639 */
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
{SENSOR, 0x06, 0x71, 0x00},
|
||||
{SENSOR, 0x07, 0xe8, 0x00},
|
||||
{SENSOR, 0x08, 0x02, 0x00},
|
||||
@ -358,12 +267,8 @@ static const unsigned char init_s5k83a[][4] =
|
||||
{SENSOR, 0x19, 0x00, 0x00},
|
||||
{SENSOR, 0x1a, 0x98, 0x00},
|
||||
{SENSOR, 0x0f, 0x02, 0x00},
|
||||
|
||||
{SENSOR, 0x10, 0xe5, 0x00},
|
||||
{SENSOR, S5K83A_PAGE_MAP, 0x05, 0x00},
|
||||
{SENSOR_LONG, 0x14, 0x00, 0x20},
|
||||
{SENSOR_LONG, 0x0d, 0x00, 0x7d},
|
||||
{SENSOR_LONG, 0x1b, 0x0d, 0x05},
|
||||
|
||||
/* normal colors
|
||||
(this is value after boot, but after tries can be different) */
|
||||
|
Loading…
Reference in New Issue
Block a user