summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-16 08:49:49 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-16 08:49:49 -0200
commitb34a0d93b84d618d2bc1f5fb38f34e3f7b92a800 (patch)
treebe18b1bed984022cadb54dfc47cc6910866f2303 /linux/drivers/media
parentf1c557c347ffdb71872fe4cc6c093c7a5c7026ef (diff)
downloadmediapointer-dvb-s2-b34a0d93b84d618d2bc1f5fb38f34e3f7b92a800.tar.gz
mediapointer-dvb-s2-b34a0d93b84d618d2bc1f5fb38f34e3f7b92a800.tar.bz2
Allow RESET_CLK callback and avoids unneeded loading
From: Michel Ludwig <michel.ludwig@gmail.com> TM5600/TM6000 needs clock reset during firmware load. This patch adds the capability of caling a callback method for this. Also, avoids uneeded firmware loads. Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/tuner-xc2028.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c
index 4ed545bb1..edb325017 100644
--- a/linux/drivers/media/video/tuner-xc2028.c
+++ b/linux/drivers/media/video/tuner-xc2028.c
@@ -473,6 +473,23 @@ static int load_firmware(struct dvb_frontend *fe, unsigned int type,
}
continue;
}
+ if (size >= 0xff00) {
+ switch (size) {
+ case 0xff00:
+ rc = priv->tuner_callback(priv->video_dev,
+ XC2028_RESET_CLK, 0);
+ if (rc < 0) {
+ tuner_err("Error at RESET code %d\n",
+ (*p) & 0x7f);
+ return -EINVAL;
+ }
+ default:
+ tuner_info("Invalid RESET code %d\n",
+ size & 0x7f);
+ return -EINVAL;
+
+ }
+ }
/* Checks for a sleep command */
if (size & 0x8000) {
@@ -639,6 +656,9 @@ static int check_firmware(struct dvb_frontend *fe, enum tuner_mode new_mode,
priv->bandwidth = bandwidth;
}
+ if (!change_digital_bandwidth && priv->mode == T_DIGITAL_TV)
+ return 0;
+
/* Load INIT1, if needed */
tuner_dbg("Load init1 firmware, if exists\n");
type0 = BASE | INIT1;