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/hopper_vp3028.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/hopper_vp3028.c')
-rw-r--r-- | drivers/media/dvb/mantis/hopper_vp3028.c | 27 |
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 ba0c7e58b7a6..16b39d3b9ace 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 = { | |||
45 | static int vp3028_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) | 45 | static int vp3028_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) |
46 | { | 46 | { |
47 | struct i2c_adapter *adapter = &mantis->adapter; | 47 | struct i2c_adapter *adapter = &mantis->adapter; |
48 | struct mantis_hwconfig *config = mantis->hwconfig; | ||
48 | int err = 0; | 49 | int err = 0; |
49 | 50 | ||
51 | gpio_set_bits(mantis, config->reset, 0); | ||
52 | msleep(100); | ||
50 | err = mantis_frontend_power(mantis, POWER_ON); | 53 | err = mantis_frontend_power(mantis, POWER_ON); |
51 | mantis_frontend_soft_reset(mantis); | 54 | msleep(100); |
52 | 55 | gpio_set_bits(mantis, config->reset, 1); | |
53 | dprintk(MANTIS_ERROR, 1, "Probing for 10353 (DVB-T)"); | ||
54 | fe = zl10353_attach(&hopper_vp3028_config, adapter); | ||
55 | |||
56 | if (!fe) | ||
57 | return -1; | ||
58 | 56 | ||
57 | err = mantis_frontend_power(mantis, POWER_ON); | ||
58 | if (err == 0) { | ||
59 | msleep(250); | ||
60 | dprintk(MANTIS_ERROR, 1, "Probing for 10353 (DVB-T)"); | ||
61 | fe = zl10353_attach(&hopper_vp3028_config, adapter); | ||
62 | |||
63 | if (!fe) | ||
64 | return -1; | ||
65 | } else { | ||
66 | dprintk(MANTIS_ERROR, 1, "Frontend on <%s> POWER ON failed! <%d>", | ||
67 | adapter->name, | ||
68 | err); | ||
69 | |||
70 | return -EIO; | ||
71 | } | ||
59 | dprintk(MANTIS_ERROR, 1, "Done!"); | 72 | dprintk(MANTIS_ERROR, 1, "Done!"); |
60 | 73 | ||
61 | return 0; | 74 | return 0; |