diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-03-29 18:53:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 13:09:42 -0400 |
commit | 28930fa9af9be77abe3d8bce3193908bf266efc6 (patch) | |
tree | bb867ecfd3069e79ef398bbe3550dabdeefa99dc /drivers/media/video/au0828/au0828-cards.c | |
parent | 265a6510629ab39f33ece43a857089dd37978184 (diff) |
V4L/DVB (7622): HVR950Q Hauppauge eeprom support
HVR950Q Hauppauge eeprom support.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/au0828/au0828-cards.c')
-rw-r--r-- | drivers/media/video/au0828/au0828-cards.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/media/video/au0828/au0828-cards.c b/drivers/media/video/au0828/au0828-cards.c index c4cb11e9d6fc..cbcc6f81f460 100644 --- a/drivers/media/video/au0828/au0828-cards.c +++ b/drivers/media/video/au0828/au0828-cards.c | |||
@@ -75,6 +75,45 @@ int au0828_tuner_callback(void *priv, int command, int arg) | |||
75 | return 0; /* Should never be here */ | 75 | return 0; /* Should never be here */ |
76 | } | 76 | } |
77 | 77 | ||
78 | static void hauppauge_eeprom(struct au0828_dev *dev, u8 *eeprom_data) | ||
79 | { | ||
80 | struct tveeprom tv; | ||
81 | |||
82 | tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data); | ||
83 | |||
84 | /* Make sure we support the board model */ | ||
85 | switch (tv.model) | ||
86 | { | ||
87 | case 72001: /* WinTV-HVR950q (Retail, IR, ATSC/QAM and basic analog video */ | ||
88 | break; | ||
89 | default: | ||
90 | printk("%s: warning: unknown hauppauge model #%d\n", __FUNCTION__, tv.model); | ||
91 | break; | ||
92 | } | ||
93 | |||
94 | printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n", __FUNCTION__, tv.model); | ||
95 | } | ||
96 | |||
97 | |||
98 | void au0828_card_setup(struct au0828_dev *dev) | ||
99 | { | ||
100 | |||
101 | static u8 eeprom[256]; | ||
102 | |||
103 | if (dev->i2c_rc == 0) { | ||
104 | dev->i2c_client.addr = 0xa0 >> 1; | ||
105 | tveeprom_read(&dev->i2c_client, eeprom, sizeof(eeprom)); | ||
106 | } | ||
107 | |||
108 | switch(dev->board) { | ||
109 | case AU0828_BOARD_HAUPPAUGE_HVR850: | ||
110 | case AU0828_BOARD_HAUPPAUGE_HVR950Q: | ||
111 | if (dev->i2c_rc == 0) | ||
112 | hauppauge_eeprom(dev, eeprom+0xa0); | ||
113 | break; | ||
114 | } | ||
115 | } | ||
116 | |||
78 | /* | 117 | /* |
79 | * The bridge has between 8 and 12 gpios. | 118 | * The bridge has between 8 and 12 gpios. |
80 | * Regs 1 and 0 deal with output enables. | 119 | * Regs 1 and 0 deal with output enables. |