Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5403bbae9bfebe1f2df3a022c83e54f70906cefe
Commit:     5403bbae9bfebe1f2df3a022c83e54f70906cefe
Parent:     a37b4c9bc87a74ed5003c385eae264fc0acf6b35
Author:     Michel Ludwig <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 16 07:49:49 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:14 2008 -0200

    V4L/DVB (6612): Allow RESET_CLK callback and avoids unneeded loading
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/tuner-xc2028.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/tuner-xc2028.c 
b/drivers/media/video/tuner-xc2028.c
index 0a2ffe4..89e6e64 100644
--- a/drivers/media/video/tuner-xc2028.c
+++ b/drivers/media/video/tuner-xc2028.c
@@ -461,6 +461,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) {
@@ -627,6 +644,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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to