diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-20 08:23:24 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-20 08:32:34 -0500 |
commit | de72405f6fc1aaedc0412f88cf681ed33519c49a (patch) | |
tree | 8ac83a13f2067b95c72a408c4470c2ff8e353a29 /drivers/media/video | |
parent | 82e7dbbd4a16274b0a7038978734fc11bbf9f4b6 (diff) |
[media] em28xx: Fix CodingStyle issues introduced by changeset 82e7dbb
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 17 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-dvb.c | 57 |
2 files changed, 31 insertions, 43 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 705aedfafaec..d92e0af32b6c 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -337,9 +337,8 @@ static struct em28xx_reg_seq pctv_460e[] = { | |||
337 | }; | 337 | }; |
338 | 338 | ||
339 | static struct em28xx_reg_seq hauppauge_930c_gpio[] = { | 339 | static struct em28xx_reg_seq hauppauge_930c_gpio[] = { |
340 | // xc5000 reset | ||
341 | {EM2874_R80_GPIO, 0x6f, 0xff, 10}, | 340 | {EM2874_R80_GPIO, 0x6f, 0xff, 10}, |
342 | {EM2874_R80_GPIO, 0x4f, 0xff, 10}, | 341 | {EM2874_R80_GPIO, 0x4f, 0xff, 10}, /* xc5000 reset */ |
343 | {EM2874_R80_GPIO, 0x6f, 0xff, 10}, | 342 | {EM2874_R80_GPIO, 0x6f, 0xff, 10}, |
344 | {EM2874_R80_GPIO, 0x4f, 0xff, 10}, | 343 | {EM2874_R80_GPIO, 0x4f, 0xff, 10}, |
345 | { -1, -1, -1, -1}, | 344 | { -1, -1, -1, -1}, |
@@ -905,6 +904,8 @@ struct em28xx_board em28xx_boards[] = { | |||
905 | .tuner_addr = 0x41, | 904 | .tuner_addr = 0x41, |
906 | .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */ | 905 | .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */ |
907 | .tuner_gpio = terratec_h5_gpio, | 906 | .tuner_gpio = terratec_h5_gpio, |
907 | #else | ||
908 | .tuner_type = TUNER_ABSENT, | ||
908 | #endif | 909 | #endif |
909 | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | | 910 | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | |
910 | EM28XX_I2C_CLK_WAIT_ENABLE | | 911 | EM28XX_I2C_CLK_WAIT_ENABLE | |
@@ -913,12 +914,14 @@ struct em28xx_board em28xx_boards[] = { | |||
913 | [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = { | 914 | [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = { |
914 | .name = "Hauppauge WinTV HVR 930C", | 915 | .name = "Hauppauge WinTV HVR 930C", |
915 | .has_dvb = 1, | 916 | .has_dvb = 1, |
916 | //#if 0 | 917 | #if 0 /* FIXME: Add analog support */ |
917 | // .tuner_type = TUNER_XC5000, | 918 | .tuner_type = TUNER_XC5000, |
918 | // .tuner_addr = 0x41, | 919 | .tuner_addr = 0x41, |
919 | // .dvb_gpio = hauppauge_930c_digital, /* FIXME: probably wrong */ | 920 | .dvb_gpio = hauppauge_930c_digital, |
920 | .tuner_gpio = hauppauge_930c_gpio, | 921 | .tuner_gpio = hauppauge_930c_gpio, |
921 | //#endif | 922 | #else |
923 | .tuner_type = TUNER_ABSENT, | ||
924 | #endif | ||
922 | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | | 925 | .i2c_speed = EM2874_I2C_SECONDARY_BUS_SELECT | |
923 | EM28XX_I2C_CLK_WAIT_ENABLE | | 926 | EM28XX_I2C_CLK_WAIT_ENABLE | |
924 | EM28XX_I2C_FREQ_400_KHZ, | 927 | EM28XX_I2C_FREQ_400_KHZ, |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index d19939b04ec3..55a900897cac 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -347,42 +347,27 @@ static void hauppauge_hvr930c_init(struct em28xx *dev) | |||
347 | int i; | 347 | int i; |
348 | 348 | ||
349 | struct em28xx_reg_seq hauppauge_hvr930c_init[] = { | 349 | struct em28xx_reg_seq hauppauge_hvr930c_init[] = { |
350 | {EM2874_R80_GPIO, 0xff, 0xff, 101}, //11111111 | 350 | {EM2874_R80_GPIO, 0xff, 0xff, 0x65}, |
351 | // {0xd , 0xff, 0xff, 101}, //11111111 | 351 | {EM2874_R80_GPIO, 0xfb, 0xff, 0x32}, |
352 | {EM2874_R80_GPIO, 0xfb, 0xff, 50}, //11111011 init bit 3 | 352 | {EM2874_R80_GPIO, 0xff, 0xff, 0xb8}, |
353 | {EM2874_R80_GPIO, 0xff, 0xff, 184}, //11111111 | ||
354 | { -1, -1, -1, -1}, | 353 | { -1, -1, -1, -1}, |
355 | }; | 354 | }; |
356 | struct em28xx_reg_seq hauppauge_hvr930c_end[] = { | 355 | struct em28xx_reg_seq hauppauge_hvr930c_end[] = { |
357 | {EM2874_R80_GPIO, 0xef, 0xff, 1}, //11101111 | 356 | {EM2874_R80_GPIO, 0xef, 0xff, 0x01}, |
358 | {EM2874_R80_GPIO, 0xaf, 0xff, 101}, //10101111 init bit 7 | 357 | {EM2874_R80_GPIO, 0xaf, 0xff, 0x65}, |
359 | {EM2874_R80_GPIO, 0xef, 0xff, 118}, //11101111 | 358 | {EM2874_R80_GPIO, 0xef, 0xff, 0x76}, |
359 | {EM2874_R80_GPIO, 0xef, 0xff, 0x01}, | ||
360 | {EM2874_R80_GPIO, 0xcf, 0xff, 0x0b}, | ||
361 | {EM2874_R80_GPIO, 0xef, 0xff, 0x40}, | ||
362 | |||
363 | {EM2874_R80_GPIO, 0xcf, 0xff, 0x65}, | ||
364 | {EM2874_R80_GPIO, 0xef, 0xff, 0x65}, | ||
365 | {EM2874_R80_GPIO, 0xcf, 0xff, 0x0b}, | ||
366 | {EM2874_R80_GPIO, 0xef, 0xff, 0x65}, | ||
360 | 367 | ||
361 | |||
362 | //per il tuner? | ||
363 | {EM2874_R80_GPIO, 0xef, 0xff, 1}, //11101111 | ||
364 | {EM2874_R80_GPIO, 0xcf, 0xff, 11}, //11001111 init bit 6 | ||
365 | {EM2874_R80_GPIO, 0xef, 0xff, 64}, //11101111 | ||
366 | |||
367 | {EM2874_R80_GPIO, 0xcf, 0xff, 101}, //11001111 init bit 6 | ||
368 | {EM2874_R80_GPIO, 0xef, 0xff, 101}, //11101111 | ||
369 | {EM2874_R80_GPIO, 0xcf, 0xff, 11}, //11001111 init bit 6 | ||
370 | {EM2874_R80_GPIO, 0xef, 0xff, 101}, //11101111 | ||
371 | |||
372 | // {EM2874_R80_GPIO, 0x6f, 0xff, 10}, //01101111 | ||
373 | // {EM2874_R80_GPIO, 0x6d, 0xff, 100}, //01101101 init bit 2 | ||
374 | { -1, -1, -1, -1}, | 368 | { -1, -1, -1, -1}, |
375 | }; | 369 | }; |
376 | 370 | ||
377 | struct em28xx_reg_seq hauppauge_hvr930c_end2[] = { | ||
378 | // {EM2874_R80_GPIO, 0x6f, 0xff, 124}, //01101111 | ||
379 | // {EM2874_R80_GPIO, 0x4f, 0xff, 11}, //01001111 init bit 6 | ||
380 | // {EM2874_R80_GPIO, 0x6f, 0xff, 1}, //01101111 | ||
381 | // {EM2874_R80_GPIO, 0x4f, 0xff, 10}, //01001111 init bit 6 | ||
382 | // {EM2874_R80_GPIO, 0x6f, 0xff, 100}, //01101111 | ||
383 | // {0xd , 0x42, 0xff, 101}, //11111111 | ||
384 | { -1, -1, -1, -1}, | ||
385 | }; | ||
386 | struct { | 371 | struct { |
387 | unsigned char r[4]; | 372 | unsigned char r[4]; |
388 | int len; | 373 | int len; |
@@ -419,8 +404,6 @@ static void hauppauge_hvr930c_init(struct em28xx *dev) | |||
419 | em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x44); | 404 | em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x44); |
420 | msleep(30); | 405 | msleep(30); |
421 | 406 | ||
422 | em28xx_gpio_set(dev, hauppauge_hvr930c_end2); | ||
423 | msleep(10); | ||
424 | em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x45); | 407 | em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, 0x45); |
425 | msleep(10); | 408 | msleep(10); |
426 | 409 | ||
@@ -885,7 +868,9 @@ static int em28xx_dvb_init(struct em28xx *dev) | |||
885 | 868 | ||
886 | dvb->dont_attach_fe1 = 1; | 869 | dvb->dont_attach_fe1 = 1; |
887 | 870 | ||
888 | dvb->fe[0] = dvb_attach(drxk_attach, &hauppauge_930c_drxk, &dev->i2c_adap, &dvb->fe[1]); | 871 | dvb->fe[0] = dvb_attach(drxk_attach, |
872 | &hauppauge_930c_drxk, &dev->i2c_adap, | ||
873 | &dvb->fe[1]); | ||
889 | if (!dvb->fe[0]) { | 874 | if (!dvb->fe[0]) { |
890 | result = -EINVAL; | 875 | result = -EINVAL; |
891 | goto out_free; | 876 | goto out_free; |
@@ -901,12 +886,12 @@ static int em28xx_dvb_init(struct em28xx *dev) | |||
901 | struct xc5000_config cfg; | 886 | struct xc5000_config cfg; |
902 | memset(&cfg, 0, sizeof(cfg)); | 887 | memset(&cfg, 0, sizeof(cfg)); |
903 | cfg.i2c_address = 0x61; | 888 | cfg.i2c_address = 0x61; |
904 | //cfg.if_khz = 4570; //FIXME | 889 | cfg.if_khz = 4000; |
905 | cfg.if_khz = 4000; //FIXME (should be ok) read from i2c traffic | ||
906 | 890 | ||
907 | if (dvb->fe[0]->ops.i2c_gate_ctrl) | 891 | if (dvb->fe[0]->ops.i2c_gate_ctrl) |
908 | dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1); | 892 | dvb->fe[0]->ops.i2c_gate_ctrl(dvb->fe[0], 1); |
909 | if (!dvb_attach(xc5000_attach, dvb->fe[0], &dev->i2c_adap, &cfg)) { | 893 | if (!dvb_attach(xc5000_attach, dvb->fe[0], &dev->i2c_adap, |
894 | &cfg)) { | ||
910 | result = -EINVAL; | 895 | result = -EINVAL; |
911 | goto out_free; | 896 | goto out_free; |
912 | } | 897 | } |
@@ -978,7 +963,7 @@ static int em28xx_dvb_init(struct em28xx *dev) | |||
978 | /* define general-purpose callback pointer */ | 963 | /* define general-purpose callback pointer */ |
979 | dvb->fe[0]->callback = em28xx_tuner_callback; | 964 | dvb->fe[0]->callback = em28xx_tuner_callback; |
980 | if (dvb->fe[1]) | 965 | if (dvb->fe[1]) |
981 | dvb->fe[1]->callback = em28xx_tuner_callback; | 966 | dvb->fe[1]->callback = em28xx_tuner_callback; |
982 | 967 | ||
983 | /* register everything */ | 968 | /* register everything */ |
984 | result = em28xx_register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); | 969 | result = em28xx_register_dvb(dvb, THIS_MODULE, dev, &dev->udev->dev); |