mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-17 22:41:25 +00:00
V4L/DVB (11482): gspca - m5602-mt9m111: Remove lots of redundant init code
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
da773c9e5f
commit
938fe53bf0
@ -162,104 +162,19 @@ static const unsigned char init_mt9m111[][4] =
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
{BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
|
||||
{BRIDGE, M5602_XB_SENSOR_TYPE, 0x0d, 0x00},
|
||||
{BRIDGE, M5602_XB_SENSOR_CTRL, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_ADC_CTRL, 0xc0, 0x00},
|
||||
{BRIDGE, M5602_XB_SENSOR_TYPE, 0x09, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0xff, 0xff},
|
||||
{SENSOR, MT9M111_SC_RESET, 0xff, 0xde},
|
||||
{SENSOR, MT9M111_SC_RESET, 0xff, 0xff},
|
||||
{SENSOR, MT9M111_SC_RESET, 0xff, 0xf7},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
|
||||
{SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
|
||||
MT9M111_TRISTATE_PIN_IN_STANDBY |
|
||||
MT9M111_SOC_SOFT_STANDBY},
|
||||
|
||||
{BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
|
||||
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
|
||||
{SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
|
||||
MT9M111_TRISTATE_PIN_IN_STANDBY |
|
||||
MT9M111_SOC_SOFT_STANDBY},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
|
||||
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
|
||||
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
|
||||
{SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
|
||||
MT9M111_TRISTATE_PIN_IN_STANDBY |
|
||||
MT9M111_SOC_SOFT_STANDBY},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x09},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x0c},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x04},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x01},
|
||||
{SENSOR, MT9M111_CP_GLOBAL_CLK_CONTROL, 0x00,
|
||||
MT9M111_TRISTATE_PIN_IN_STANDBY |
|
||||
MT9M111_SOC_SOFT_STANDBY},
|
||||
{BRIDGE, M5602_XB_GPIO_DIR, 0x05, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DAT, 0x04, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_H, 0x3e, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DIR_H, 0x3e, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_L, 0xff, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DIR_L, 0xff, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DAT_H, 0x02, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DAT_L, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 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_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DIR, 0x07, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_DAT, 0x0b, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_H, 0x06, 0x00},
|
||||
{BRIDGE, M5602_XB_GPIO_EN_L, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a, 0x00},
|
||||
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x05},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x29},
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_SC_RESET, 0x00, 0x08},
|
||||
@ -273,9 +188,9 @@ static const unsigned char init_mt9m111[][4] =
|
||||
{SENSOR, MT9M111_CP_LUMA_CLIP, 0xff, 0x00},
|
||||
{SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_A, 0x14, 0x00},
|
||||
{SENSOR, MT9M111_CP_OUTPUT_FORMAT_CTL2_CONTEXT_B, 0x14, 0x00},
|
||||
|
||||
{SENSOR, 0xcd, 0x00, 0x0e},
|
||||
{SENSOR, 0xd0, 0x00, 0x40},
|
||||
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x02},
|
||||
{SENSOR, MT9M111_CC_AUTO_EXPOSURE_PARAMETER_18, 0x00, 0x00},
|
||||
{SENSOR, MT9M111_CC_AWB_PARAMETER_7, 0xef, 0x03},
|
||||
@ -327,6 +242,8 @@ static const unsigned char init_mt9m111[][4] =
|
||||
{SENSOR, MT9M111_SC_R_MODE_CONTEXT_B, 0x01, 0x0f}, /* 271 */
|
||||
{SENSOR, MT9M111_SC_R_MODE_CONTEXT_A, 0x01, 0x0f}, /* 271 */
|
||||
{SENSOR, 0x30, 0x04, 0x00},
|
||||
/* Set number of blank rows chosen to 400 */
|
||||
{SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90},
|
||||
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x06, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
@ -352,10 +269,6 @@ static const unsigned char init_mt9m111[][4] =
|
||||
{BRIDGE, M5602_XB_SIG_INI, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00, 0x00},
|
||||
{BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0, 0x00},
|
||||
|
||||
{SENSOR, MT9M111_PAGE_MAP, 0x00, 0x00},
|
||||
/* Set number of blank rows chosen to 400 */
|
||||
{SENSOR, MT9M111_SC_SHUTTER_WIDTH, 0x01, 0x90},
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user