aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/mantis/hopper_vp3028.c
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-12-04 05:57:28 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-01-17 11:55:43 -0200
commitbc832fa2c0310c25ed60204616ccef4f8db088f3 (patch)
tree4544c2e786cc462d2b9d143b3c3a0ad7cd74a424 /drivers/media/dvb/mantis/hopper_vp3028.c
parent3e978a8284080d801d20cda377d9cf7c12fe68b9 (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/hopper_vp3028.c')
-rw-r--r--drivers/media/dvb/mantis/hopper_vp3028.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/media/dvb/mantis/hopper_vp3028.c b/drivers/media/dvb/mantis/hopper_vp3028.c
index ba0c7e58b7a..16b39d3b9ac 100644
--- a/drivers/media/dvb/mantis/hopper_vp3028.c
+++ b/drivers/media/dvb/mantis/hopper_vp3028.c
@@ -45,17 +45,30 @@ struct zl10353_config hopper_vp3028_config = {
static int vp3028_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe)
{
struct i2c_adapter *adapter = &mantis->adapter;
+ struct mantis_hwconfig *config = mantis->hwconfig;
int err = 0;
+ gpio_set_bits(mantis, config->reset, 0);
+ msleep(100);
err = mantis_frontend_power(mantis, POWER_ON);
- mantis_frontend_soft_reset(mantis);
-
- dprintk(MANTIS_ERROR, 1, "Probing for 10353 (DVB-T)");
- fe = zl10353_attach(&hopper_vp3028_config, adapter);
-
- if (!fe)
- return -1;
+ msleep(100);
+ gpio_set_bits(mantis, config->reset, 1);
+ err = mantis_frontend_power(mantis, POWER_ON);
+ if (err == 0) {
+ msleep(250);
+ dprintk(MANTIS_ERROR, 1, "Probing for 10353 (DVB-T)");
+ fe = zl10353_attach(&hopper_vp3028_config, adapter);
+
+ if (!fe)
+ return -1;
+ } else {
+ dprintk(MANTIS_ERROR, 1, "Frontend on <%s> POWER ON failed! <%d>",
+ adapter->name,
+ err);
+
+ return -EIO;
+ }
dprintk(MANTIS_ERROR, 1, "Done!");
return 0;