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 | |
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')
-rw-r--r-- | drivers/media/video/au0828/au0828-cards.c | 39 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/au0828/au0828.h | 2 |
3 files changed, 44 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. |
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index 8d0b8a8b06bd..f5df99ea3b9f 100644 --- a/drivers/media/video/au0828/au0828-core.c +++ b/drivers/media/video/au0828/au0828-core.c | |||
@@ -210,6 +210,9 @@ static int au0828_usb_probe (struct usb_interface *interface, | |||
210 | /* I2C */ | 210 | /* I2C */ |
211 | au0828_i2c_register(dev); | 211 | au0828_i2c_register(dev); |
212 | 212 | ||
213 | /* Setup */ | ||
214 | au0828_card_setup(dev); | ||
215 | |||
213 | /* Digital TV */ | 216 | /* Digital TV */ |
214 | au0828_dvb_register(dev); | 217 | au0828_dvb_register(dev); |
215 | 218 | ||
diff --git a/drivers/media/video/au0828/au0828.h b/drivers/media/video/au0828/au0828.h index 517227667040..3dc09f8ffef7 100644 --- a/drivers/media/video/au0828/au0828.h +++ b/drivers/media/video/au0828/au0828.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/usb.h> | 22 | #include <linux/usb.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/i2c-algo-bit.h> | 24 | #include <linux/i2c-algo-bit.h> |
25 | #include <media/tveeprom.h> | ||
25 | 26 | ||
26 | /* DVB */ | 27 | /* DVB */ |
27 | #include "demux.h" | 28 | #include "demux.h" |
@@ -103,6 +104,7 @@ extern struct usb_device_id au0828_usb_id_table[]; | |||
103 | extern const unsigned int au0828_bcount; | 104 | extern const unsigned int au0828_bcount; |
104 | extern void au0828_gpio_setup(struct au0828_dev *dev); | 105 | extern void au0828_gpio_setup(struct au0828_dev *dev); |
105 | extern int au0828_tuner_callback(void *priv, int command, int arg); | 106 | extern int au0828_tuner_callback(void *priv, int command, int arg); |
107 | extern void au0828_card_setup(struct au0828_dev *dev); | ||
106 | 108 | ||
107 | /* ----------------------------------------------------------- */ | 109 | /* ----------------------------------------------------------- */ |
108 | /* au0828-i2c.c */ | 110 | /* au0828-i2c.c */ |