diff options
author | Devin Heitmueller <dheitmueller@kernellabs.com> | 2012-08-06 22:47:02 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-09 20:37:56 -0300 |
commit | 4a03dafc7b0a347854bc0a8652ffa314150fd1e5 (patch) | |
tree | 590e3ffbb5b9b42cacb3321e4a84066243510b14 /drivers/media/dvb/frontends/au8522_dig.c | |
parent | fc7a74bad1ae1d68a1a9999634baeb4bae277a92 (diff) |
[media] au0828: prevent i2c gate from being kept open while in analog mode
The original implementation of the analog support would use an
i2c_gate_ctrl function when using the digital side of the au8522, but on
the analog side we would always just force the gate open and leave it
open all the time.
This can have adverse effects on the xc5000 given the tuner is receiving
all the spurious i2c traffic (a problem which can be exaggerated due to
bugs in the au0828 i2c hardware implementation).
Rework the existing hack to only open/close the gate when actually
talking to the tuner.
This logic might need to be reworked a bit if anybody ever tries to add
support for a board that has the au0828/au8522 but doesn't have digital
support implemented (because the i2c_gate_ctrl callback is being set in
the DVB attach). However given how few different models are in
circulation, this can be deferred until such a situation arises (if
ever).
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/au8522_dig.c')
-rw-r--r-- | drivers/media/dvb/frontends/au8522_dig.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/au8522_dig.c b/drivers/media/dvb/frontends/au8522_dig.c index ee8cf81cf750..a68974f6d708 100644 --- a/drivers/media/dvb/frontends/au8522_dig.c +++ b/drivers/media/dvb/frontends/au8522_dig.c @@ -777,6 +777,8 @@ struct dvb_frontend *au8522_attach(const struct au8522_config *config, sizeof(struct dvb_frontend_ops)); state->frontend.demodulator_priv = state; + state->frontend.ops.analog_ops.i2c_gate_ctrl = au8522_analog_i2c_gate_ctrl; + if (au8522_init(&state->frontend) != 0) { printk(KERN_ERR "%s: Failed to initialize correctly\n", __func__); |