aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/mantis/mantis_vp1034.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/mantis_vp1034.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/mantis_vp1034.c')
-rw-r--r--drivers/media/dvb/mantis/mantis_vp1034.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/drivers/media/dvb/mantis/mantis_vp1034.c b/drivers/media/dvb/mantis/mantis_vp1034.c
index 40778ec8f46..98a4ec89f04 100644
--- a/drivers/media/dvb/mantis/mantis_vp1034.c
+++ b/drivers/media/dvb/mantis/mantis_vp1034.c
@@ -32,6 +32,7 @@
#include "mb86a16.h"
#include "mantis_common.h"
#include "mantis_ioc.h"
+#include "mantis_dvb.h"
#include "mantis_vp1034.h"
#include "mantis_reg.h"
@@ -74,17 +75,30 @@ static int vp1034_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *
{
struct i2c_adapter *adapter = &mantis->adapter;
- dprintk(MANTIS_ERROR, 1, "Probing for MB86A16 (DVB-S/DSS)");
- fe = mb86a16_attach(&vp1034_mb86a16_config, adapter);
- if (fe) {
- dprintk(MANTIS_ERROR, 1,
- "found MB86A16 DVB-S/DSS frontend @0x%02x",
- vp1034_mb86a16_config.demod_address);
+ int err = 0;
+ err = mantis_frontend_power(mantis, POWER_ON);
+ if (err == 0) {
+ mantis_frontend_soft_reset(mantis);
+ msleep(250);
+
+ dprintk(MANTIS_ERROR, 1, "Probing for MB86A16 (DVB-S/DSS)");
+ fe = mb86a16_attach(&vp1034_mb86a16_config, adapter);
+ if (fe) {
+ dprintk(MANTIS_ERROR, 1,
+ "found MB86A16 DVB-S/DSS frontend @0x%02x",
+ vp1034_mb86a16_config.demod_address);
+
+ } else {
+ return -1;
+ }
} else {
- return -1;
- }
+ dprintk(MANTIS_ERROR, 1, "Frontend on <%s> POWER ON failed! <%d>",
+ adapter->name,
+ err);
+ return -EIO;
+ }
mantis->fe = fe;
dprintk(MANTIS_ERROR, 1, "Done!");
@@ -101,4 +115,6 @@ struct mantis_hwconfig vp1034_config = {
.bytes = 0,
.frontend_init = vp1034_frontend_init,
+ .power = GPIF_A12,
+ .reset = GPIF_A13,
};