V4L/DVB (9037): Fix support for Hauppauge Nova-S SE

Different backends have different input busses (saa7146, flexcop).
To reflect that a config-option to the s5h1420-driver was added which makes
the output mode selectable.

Furthermore the s5h1420-driver is now doing the same i2c-method as it was done
before adding support for other i2c-users.

This patch needs to go into the current release of the kernel, as this driver
is currently broken.

(Thanks to Eberhard Kaltenhaeuser for helping out to debug this issue.)

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by Patrick Boettcher and committed by Mauro Carvalho Chehab c18c5ffe dda06a8e

+12 -6
+1
drivers/media/dvb/b2c2/flexcop-fe-tuner.c
··· 491 491 .demod_address = 0x53, 492 492 .invert = 1, 493 493 .repeated_start_workaround = 1, 494 + .serial_mpeg = 1, 494 495 }; 495 496 496 497 static struct itd1000_config skystar2_rev2_7_itd1000_config = {
+6 -3
drivers/media/dvb/frontends/s5h1420.c
··· 94 94 if (ret != 3) 95 95 return ret; 96 96 } else { 97 - ret = i2c_transfer(state->i2c, &msg[1], 2); 98 - if (ret != 2) 97 + ret = i2c_transfer(state->i2c, &msg[1], 1); 98 + if (ret != 1) 99 + return ret; 100 + ret = i2c_transfer(state->i2c, &msg[2], 1); 101 + if (ret != 1) 99 102 return ret; 100 103 } 101 104 ··· 826 823 struct s5h1420_state* state = fe->demodulator_priv; 827 824 828 825 /* disable power down and do reset */ 829 - state->CON_1_val = 0x10; 826 + state->CON_1_val = state->config->serial_mpeg << 4; 830 827 s5h1420_writereg(state, 0x02, state->CON_1_val); 831 828 msleep(10); 832 829 s5h1420_reset(state);
+5 -3
drivers/media/dvb/frontends/s5h1420.h
··· 32 32 u8 demod_address; 33 33 34 34 /* does the inversion require inversion? */ 35 - u8 invert : 1; 35 + u8 invert:1; 36 36 37 - u8 repeated_start_workaround : 1; 38 - u8 cdclk_polarity : 1; /* 1 == falling edge, 0 == raising edge */ 37 + u8 repeated_start_workaround:1; 38 + u8 cdclk_polarity:1; /* 1 == falling edge, 0 == raising edge */ 39 + 40 + u8 serial_mpeg:1; 39 41 }; 40 42 41 43 #if defined(CONFIG_DVB_S5H1420) || (defined(CONFIG_DVB_S5H1420_MODULE) && defined(MODULE))