diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2011-08-04 03:13:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-08-31 14:03:22 -0400 |
commit | 4d37ece757a83c2858de9e40b9fa3da511f9ce38 (patch) | |
tree | e3e4f857fd6ccbd940579a18da3386a1480a57fe /drivers/media/common/tuners/tuner-xc2028.c | |
parent | 69d232ae8e95a229e7544989d6014e875deeb121 (diff) |
[media] tuner/xc2028: Add I2C flush callback
When loading the firmware, complete each chunk by sending an I2C flush
command to the frontend. Some devices like the tm6000 seem to require
this to properly flush the I2C buffers.
The current code in tm6000 executes the flush command once after each
I2C transfer, which slows down the firmware loading especially when
loading large BASE type images.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tuner-xc2028.c')
-rw-r--r-- | drivers/media/common/tuners/tuner-xc2028.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 16fba6b59616..b6b2868cb3f0 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c | |||
@@ -614,6 +614,13 @@ static int load_firmware(struct dvb_frontend *fe, unsigned int type, | |||
614 | p += len; | 614 | p += len; |
615 | size -= len; | 615 | size -= len; |
616 | } | 616 | } |
617 | |||
618 | /* silently fail if the frontend doesn't support I2C flush */ | ||
619 | rc = do_tuner_callback(fe, XC2028_I2C_FLUSH, 0); | ||
620 | if ((rc < 0) && (rc != -EINVAL)) { | ||
621 | tuner_err("error executing flush: %d\n", rc); | ||
622 | return rc; | ||
623 | } | ||
617 | } | 624 | } |
618 | return 0; | 625 | return 0; |
619 | } | 626 | } |