summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/au0828/au0828-cards.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-03-29 15:53:07 -0400
committerSteven Toth <stoth@hauppauge.com>2008-03-29 15:53:07 -0400
commit4c0cab7cc8debfe1d245a47baa775aa190409082 (patch)
tree525e8e2a089a2e850eed3f6961ed093c6e93ef26 /linux/drivers/media/video/au0828/au0828-cards.c
parentf75dce1c5a4e67aa7abffea6a320e23b1c33341e (diff)
downloadmediapointer-dvb-s2-4c0cab7cc8debfe1d245a47baa775aa190409082.tar.gz
mediapointer-dvb-s2-4c0cab7cc8debfe1d245a47baa775aa190409082.tar.bz2
HVR950Q Hauppauge eeprom support.
From: Steven Toth <stoth@hauppauge.com> HVR950Q Hauppauge eeprom support. Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux/drivers/media/video/au0828/au0828-cards.c')
-rw-r--r--linux/drivers/media/video/au0828/au0828-cards.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/linux/drivers/media/video/au0828/au0828-cards.c b/linux/drivers/media/video/au0828/au0828-cards.c
index c4cb11e9d..cbcc6f81f 100644
--- a/linux/drivers/media/video/au0828/au0828-cards.c
+++ b/linux/drivers/media/video/au0828/au0828-cards.c
@@ -75,6 +75,45 @@ int au0828_tuner_callback(void *priv, int command, int arg)
return 0; /* Should never be here */
}
+static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data)
+{
+ struct tveeprom tv;
+
+ tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data);
+
+ /* Make sure we support the board model */
+ switch (tv.model)
+ {
+ case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */
+ break;
+ default:
+ printk("%s: warning: unknown hauppauge model #%d\n", __FUNCTION__, tv.model);
+ break;
+ }
+
+ printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n", __FUNCTION__, tv.model);
+}
+
+
+void au0828_card_setup(struct au0828_dev *dev)
+{
+
+ static u8 eeprom[256];
+
+ if (dev->i2c_rc == 0) {
+ dev->i2c_client.addr = 0xa0 >> 1;
+ tveeprom_read(&dev->i2c_client, eeprom, sizeof(eeprom));
+ }
+
+ switch(dev->board) {
+ case AU0828_BOARD_HAUPPAUGE_HVR850:
+ case AU0828_BOARD_HAUPPAUGE_HVR950Q:
+ if (dev->i2c_rc == 0)
+ hauppauge_eeprom(dev, eeprom+0xa0);
+ break;
+ }
+}
+
/*
* The bridge has between 8 and 12 gpios.
* Regs 1 and 0 deal with output enables.