This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] NetUP Dual DVB-T/C CI RF: load firmware according card revision
Author:  Abylay Ospan <[email protected]>
Date:    Thu Jul 14 05:20:29 2011 -0300

Currently available two hardware revision:
0x1     firmware filename: dvb-netup-altera-01.fw
0x4     firmware filename: dvb-netup-altera-04.fw

Signed-off-by: Abylay Ospan <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/cx23885/cx23885-cards.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=344b9decbbee5b5a03b8de65d9d1141141101f86

diff --git a/drivers/media/video/cx23885/cx23885-cards.c 
b/drivers/media/video/cx23885/cx23885-cards.c
index bbdd2b5..9fa4db2 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -29,6 +29,7 @@
 #include "../../../staging/altera-stapl/altera.h"
 #include "cx23885.h"
 #include "tuner-xc2028.h"
+#include "netup-eeprom.h"
 #include "netup-init.h"
 #include "altera-ci.h"
 #include "xc4000.h"
@@ -1430,6 +1431,7 @@ void cx23885_card_setup(struct cx23885_dev *dev)
                const struct firmware *fw;
                const char *filename = "dvb-netup-altera-01.fw";
                char *action = "configure";
+               static struct netup_card_info cinfo;
                struct altera_config netup_config = {
                        .dev = dev,
                        .action = action,
@@ -1438,6 +1440,18 @@ void cx23885_card_setup(struct cx23885_dev *dev)
 
                netup_initialize(dev);
 
+               netup_get_card_info(&dev->i2c_bus[0].i2c_adap, &cinfo);
+               switch (cinfo.rev) {
+               case 0x4:
+                       filename = "dvb-netup-altera-04.fw";
+                       break;
+               default:
+                       filename = "dvb-netup-altera-01.fw";
+                       break;
+               }
+               printk(KERN_INFO "NetUP card rev=0x%x fw_filename=%s\n",
+                               cinfo.rev, filename);
+
                ret = request_firmware(&fw, filename, &dev->pci->dev);
                if (ret != 0)
                        printk(KERN_ERR "did not find the firmware file. (%s) "

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to