diff options
author | Manu Abraham <abraham.manu@gmail.com> | 2009-12-04 03:57:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-01-17 08:55:43 -0500 |
commit | bc832fa2c0310c25ed60204616ccef4f8db088f3 (patch) | |
tree | 4544c2e786cc462d2b9d143b3c3a0ad7cd74a424 /drivers/media/dvb/mantis/mantis_vp1033.c | |
parent | 3e978a8284080d801d20cda377d9cf7c12fe68b9 (diff) |
V4L/DVB (13798): [Mantis] Enable power for all cards, use byte mode only on relevant devices
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/mantis/mantis_vp1033.c')
-rw-r--r-- | drivers/media/dvb/mantis/mantis_vp1033.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/drivers/media/dvb/mantis/mantis_vp1033.c b/drivers/media/dvb/mantis/mantis_vp1033.c index f2092ce9c4be..0bea6e89f551 100644 --- a/drivers/media/dvb/mantis/mantis_vp1033.c +++ b/drivers/media/dvb/mantis/mantis_vp1033.c | |||
@@ -31,7 +31,10 @@ | |||
31 | 31 | ||
32 | #include "stv0299.h" | 32 | #include "stv0299.h" |
33 | #include "mantis_common.h" | 33 | #include "mantis_common.h" |
34 | #include "mantis_ioc.h" | ||
35 | #include "mantis_dvb.h" | ||
34 | #include "mantis_vp1033.h" | 36 | #include "mantis_vp1033.h" |
37 | #include "mantis_reg.h" | ||
35 | 38 | ||
36 | u8 lgtdqcs001f_inittab[] = { | 39 | u8 lgtdqcs001f_inittab[] = { |
37 | 0x01, 0x15, | 40 | 0x01, 0x15, |
@@ -163,19 +166,32 @@ static int vp1033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend * | |||
163 | { | 166 | { |
164 | struct i2c_adapter *adapter = &mantis->adapter; | 167 | struct i2c_adapter *adapter = &mantis->adapter; |
165 | 168 | ||
166 | dprintk(MANTIS_ERROR, 1, "Probing for STV0299 (DVB-S)"); | 169 | int err = 0; |
167 | fe = stv0299_attach(&lgtdqcs001f_config, adapter); | ||
168 | 170 | ||
169 | if (fe) { | 171 | err = mantis_frontend_power(mantis, POWER_ON); |
170 | fe->ops.tuner_ops.set_params = lgtdqcs001f_tuner_set; | 172 | if (err == 0) { |
171 | dprintk(MANTIS_ERROR, 1, "found STV0299 DVB-S frontend @ 0x%02x", | 173 | mantis_frontend_soft_reset(mantis); |
172 | lgtdqcs001f_config.demod_address); | 174 | msleep(250); |
173 | 175 | ||
174 | dprintk(MANTIS_ERROR, 1, "Mantis DVB-S STV0299 frontend attach success"); | 176 | dprintk(MANTIS_ERROR, 1, "Probing for STV0299 (DVB-S)"); |
177 | fe = stv0299_attach(&lgtdqcs001f_config, adapter); | ||
178 | |||
179 | if (fe) { | ||
180 | fe->ops.tuner_ops.set_params = lgtdqcs001f_tuner_set; | ||
181 | dprintk(MANTIS_ERROR, 1, "found STV0299 DVB-S frontend @ 0x%02x", | ||
182 | lgtdqcs001f_config.demod_address); | ||
183 | |||
184 | dprintk(MANTIS_ERROR, 1, "Mantis DVB-S STV0299 frontend attach success"); | ||
185 | } else { | ||
186 | return -1; | ||
187 | } | ||
175 | } else { | 188 | } else { |
176 | return -1; | 189 | dprintk(MANTIS_ERROR, 1, "Frontend on <%s> POWER ON failed! <%d>", |
177 | } | 190 | adapter->name, |
191 | err); | ||
178 | 192 | ||
193 | return -EIO; | ||
194 | } | ||
179 | mantis->fe = fe; | 195 | mantis->fe = fe; |
180 | dprintk(MANTIS_ERROR, 1, "Done!"); | 196 | dprintk(MANTIS_ERROR, 1, "Done!"); |
181 | 197 | ||
@@ -192,4 +208,6 @@ struct mantis_hwconfig vp1033_config = { | |||
192 | .bytes = 0, | 208 | .bytes = 0, |
193 | 209 | ||
194 | .frontend_init = vp1033_frontend_init, | 210 | .frontend_init = vp1033_frontend_init, |
211 | .power = GPIF_A12, | ||
212 | .reset = GPIF_A13, | ||
195 | }; | 213 | }; |