Commit de72405f authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] em28xx: Fix CodingStyle issues introduced by changeset 82e7dbbd

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 82e7dbbd
...@@ -682,7 +682,7 @@ static int init_state(struct drxk_state *state) ...@@ -682,7 +682,7 @@ static int init_state(struct drxk_state *state)
state->m_hasAudio = false; state->m_hasAudio = false;
if (!state->m_ChunkSize) if (!state->m_ChunkSize)
state->m_ChunkSize = 124; state->m_ChunkSize = 124;
state->m_oscClockFreq = 0; state->m_oscClockFreq = 0;
state->m_smartAntInverted = false; state->m_smartAntInverted = false;
......
...@@ -337,9 +337,8 @@ static struct em28xx_reg_seq pctv_460e[] = { ...@@ -337,9 +337,8 @@ static struct em28xx_reg_seq pctv_460e[] = {
}; };
static struct em28xx_reg_seq hauppauge_930c_gpio[] = { static struct em28xx_reg_seq hauppauge_930c_gpio[] = {
// xc5000 reset
{EM2874_R80_GPIO, 0x6f, 0xff, 10}, {EM2874_R80_GPIO, 0x6f, 0xff, 10},
{EM2874_R80_GPIO, 0x4f, 0xff, 10}, {EM2874_R80_GPIO, 0x4f, 0xff, 10}, /* xc5000 reset */
{EM2874_R80_GPIO, 0x6f, 0xff, 10}, {EM2874_R80_GPIO, 0x6f, 0xff, 10},
{EM2874_R80_GPIO, 0x4f, 0xff, 10}, {EM2874_R80_GPIO, 0x4f, 0xff, 10},
{ -1, -1, -1, -1}, { -1, -1, -1, -1},
...@@ -905,6 +904,8 @@ struct em28xx_board em28xx_boards[] = { ...@@ -905,6 +904,8 @@ struct em28xx_board em28xx_boards[] = {
.tuner_addr = 0x41, .tuner_addr = 0x41,
.dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */ .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */
.tuner_gpio = terratec_h5_gpio, .tuner_gpio = terratec_h5_gpio,
#else
.tuner_type = TUNER_ABSENT,
#endif #endif
.i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_CLK_WAIT_ENABLE |
...@@ -913,12 +914,14 @@ struct em28xx_board em28xx_boards[] = { ...@@ -913,12 +914,14 @@ struct em28xx_board em28xx_boards[] = {
[EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = { [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = {
.name = "Hauppauge WinTV HVR 930C", .name = "Hauppauge WinTV HVR 930C",
.has_dvb = 1, .has_dvb = 1,
//#if 0 #if 0 /* FIXME: Add analog support */
// .tuner_type = TUNER_XC5000, .tuner_type = TUNER_XC5000,
// .tuner_addr = 0x41, .tuner_addr = 0x41,
// .dvb_gpio = hauppauge_930c_digital, /* FIXME: probably wrong */ .dvb_gpio = hauppauge_930c_digital,
.tuner_gpio = hauppauge_930c_gpio, .tuner_gpio = hauppauge_930c_gpio,
//#endif #else
.tuner_type = TUNER_ABSENT,
#endif
.i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT |
EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_CLK_WAIT_ENABLE |
EM28XX_I2C_FREQ_400_KHZ, EM28XX_I2C_FREQ_400_KHZ,
......
...@@ -347,42 +347,27 @@ static void hauppauge_hvr930c_init(struct em28xx *dev) ...@@ -347,42 +347,27 @@ static void hauppauge_hvr930c_init(struct em28xx *dev)
int i; int i;
struct em28xx_reg_seq hauppauge_hvr930c_init[] = { struct em28xx_reg_seq hauppauge_hvr930c_init[] = {
{EM2874_R80_GPIO, 0xff, 0xff, 101}, //11111111 {EM2874_R80_GPIO, 0xff, 0xff, 0x65},
// {0xd , 0xff, 0xff, 101}, //11111111 {EM2874_R80_GPIO, 0xfb, 0xff, 0x32},
{EM2874_R80_GPIO, 0xfb, 0xff, 50}, //11111011 init bit 3 {EM2874_R80_GPIO, 0xff, 0xff, 0xb8},
{EM2874_R80_GPIO, 0xff, 0xff, 184}, //11111111
{ -1, -1, -1, -1}, { -1, -1, -1, -1},
}; };
struct em28xx_reg_seq hauppauge_hvr930c_end[] = { struct em28xx_reg_seq hauppauge_hvr930c_end[] = {
{EM2874_R80_GPIO, 0xef, 0xff, 1}, //11101111 {EM2874_R80_GPIO, 0xef, 0xff, 0x01},
{EM2874_R80_GPIO, 0xaf, 0xff, 101}, //10101111 init bit 7 {EM2874_R80_GPIO, 0xaf, 0xff, 0x65},
{EM2874_R80_GPIO, 0xef, 0xff, 118}, //11101111 {EM2874_R80_GPIO, 0xef, 0xff, 0x76},
{EM2874_R80_GPIO, 0xef, 0xff, 0x01},
{EM2874_R80_GPIO, 0xcf, 0xff, 0x0b},
{EM2874_R80_GPIO, 0xef, 0xff, 0x40},
{EM2874_R80_GPIO, 0xcf, 0xff, 0x65},
{EM2874_R80_GPIO, 0xef, 0xff, 0x65},
{EM2874_R80_GPIO, 0xcf, 0xff, 0x0b},
{EM2874_R80_GPIO, 0xef, 0xff, 0x65},
//per il tuner?
{EM2874_R80_GPIO, 0xef, 0xff, 1}, //11101111
{EM2874_R80_GPIO, 0xcf, 0xff, 11}, //11001111 init bit 6
{EM2874_R80_GPIO, 0xef, 0xff, 64}, //11101111
{EM2874_R80_GPIO, 0xcf, 0xff, 101}, //11001111 init bit 6
{EM2874_R80_GPIO, 0xef, 0xff, 101}, //11101111
{EM2874_R80_GPIO, 0xcf, 0xff, 11}, //11001111 init bit 6
{EM2874_R80_GPIO, 0xef, 0xff, 101}, //11101111
// {EM2874_R80_GPIO, 0x6f, 0xff, 10}, //01101111
// {EM2874_R80_GPIO, 0x6d, 0xff, 100}, //01101101 init bit 2
{ -1, -1, -1, -1}, { -1, -1, -1, -1},
}; };
struct em28xx_reg_seq hauppauge_hvr930c_end2[] = {
// {EM2874_R80_GPIO, 0x6f, 0xff, 124}, //01101111
// {EM2874_R80_GPIO, 0x4f, 0xff, 11}, //01001111 init bit 6
// {EM2874_R80_GPIO, 0x6f, 0xff, 1}, //01101111
// {EM2874_R80_GPIO, 0x4f, 0xff, 10}, //01001111 init bit 6
// {EM2874_R80_GPIO, 0x6f, 0xff, 100}, //01101111
// {0xd , 0x42, 0xff, 101}, //11111111
{ -1, -1, -1, -1},
};
struct { struct {
unsigned char r[4]; unsigned char r[4];
int len; int len;
...@@ -419,8 +404,6 @@ static void hauppauge_hvr930c_init(struct em28xx *dev) ...@@ -419,8 +404,6 @@ static void hauppauge_hvr930c_init(struct em28xx *dev)
em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x44); em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x44);
msleep(30); msleep(30);
em28xx_gpio_set(dev, hauppauge_hvr930c_end2);
msleep(10);
em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x45); em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x45);
msleep(10); msleep(10);
...@@ -885,7 +868,9 @@ static int em28xx_dvb_init(struct em28xx *dev) ...@@ -885,7 +868,9 @@ static int em28xx_dvb_init(struct em28xx *dev)
dvb->dont_attach_fe1 = 1; dvb->dont_attach_fe1 = 1;
dvb->fe[0] = dvb_attach(drxk_attach, &hauppauge_930c_drxk, &dev->i2c_adap, &dvb->fe[1]); dvb->fe[0] = dvb_attach(drxk_attach,
&hauppauge_930c_drxk, &dev->i2c_adap,
&dvb->fe[1]);
if (!dvb->fe[0]) { if (!dvb->fe[0]) {
result = -EINVAL; result = -EINVAL;
goto out_free; goto out_free;
...@@ -901,12 +886,12 @@ static int em28xx_dvb_init(struct em28xx *dev) ...@@ -901,12 +886,12 @@ static int em28xx_dvb_init(struct em28xx *dev)
struct xc5000_config cfg; struct xc5000_config cfg;
memset(&cfg, 0, sizeof(cfg)); memset(&cfg, 0, sizeof(cfg));
cfg.i2c_address = 0x61; cfg.i2c_address = 0x61;
//cfg.if_khz = 4570; //FIXME cfg.if_khz = 4000;
cfg.if_khz = 4000; //FIXME (should be ok) read from i2c traffic
if (dvb->fe[0]->ops.i2c_gate_ctrl) if (dvb->fe[0]->ops.i2c_gate_ctrl)
dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1); dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1);
if (!dvb_attach(xc5000_attach, dvb->fe[0], &dev->i2c_adap, &cfg)) { if (!dvb_attach(xc5000_attach, dvb->fe[0], &dev->i2c_adap,
&cfg)) {
result = -EINVAL; result = -EINVAL;
goto out_free; goto out_free;
} }
...@@ -978,7 +963,7 @@ static int em28xx_dvb_init(struct em28xx *dev) ...@@ -978,7 +963,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
/* define general-purpose callback pointer */ /* define general-purpose callback pointer */
dvb->fe[0]->callback = em28xx_tuner_callback; dvb->fe[0]->callback = em28xx_tuner_callback;
if (dvb->fe[1]) if (dvb->fe[1])
dvb->fe[1]->callback = em28xx_tuner_callback; dvb->fe[1]->callback = em28xx_tuner_callback;
/* register everything */ /* register everything */
result = em28xx_register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); result = em28xx_register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment