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

V4L/DVB (6969): Avoid causing regressions for non-HVR950 boards

Only HVR950 has analog_gpio configured. It makes no sense to set gpio to 0 for
other boards. Better to add a test, while this var is not set for all xc3028
devices.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 11fcd470
...@@ -485,16 +485,19 @@ static int em28xx_tuner_callback(void *ptr, int command, int arg) ...@@ -485,16 +485,19 @@ static int em28xx_tuner_callback(void *ptr, int command, int arg)
switch (command) { switch (command) {
case XC2028_TUNER_RESET: case XC2028_TUNER_RESET:
{ {
char gpio0, gpio1, gpio4; /* GPIO and initialization codes for analog TV and radio
This code should be complemented for DTV, since reset
/* GPIO and initialization codes for analog TV */ codes are different.
gpio0 = dev->analog_gpio & 0xff; */
gpio1 = (dev->analog_gpio >> 8) & 0xff;
gpio4 = dev->analog_gpio >> 24;
dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1); dev->em28xx_write_regs_req(dev, 0x00, 0x48, "\x00", 1);
dev->em28xx_write_regs_req(dev, 0x00, 0x12, "\x67", 1); dev->em28xx_write_regs_req(dev, 0x00, 0x12, "\x67", 1);
if (dev->analog_gpio) {
char gpio0 = dev->analog_gpio & 0xff;
char gpio1 = (dev->analog_gpio >> 8) & 0xff;
char gpio4 = dev->analog_gpio >> 24;
if (gpio4) { if (gpio4) {
dev->em28xx_write_regs(dev, 0x04, &gpio4, 1); dev->em28xx_write_regs(dev, 0x04, &gpio4, 1);
msleep(140); msleep(140);
...@@ -505,6 +508,7 @@ static int em28xx_tuner_callback(void *ptr, int command, int arg) ...@@ -505,6 +508,7 @@ static int em28xx_tuner_callback(void *ptr, int command, int arg)
msleep(10); msleep(10);
dev->em28xx_write_regs(dev, 0x08, &gpio1, 1); dev->em28xx_write_regs(dev, 0x08, &gpio1, 1);
msleep(5); msleep(5);
}
break; break;
} }
......
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