/*
Mantis VP-1034 driver
- Copyright (C) 2005, 2006 Manu Abraham (abraham.manu@gmail.com)
+ Copyright (C) Manu Abraham (abraham.manu@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <asm/irq.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include "mb86a16.h"
#include "mantis_common.h"
#include "mantis_ioc.h"
+#include "mantis_dvb.h"
#include "mantis_vp1034.h"
#include "mantis_reg.h"
dprintk(MANTIS_ERROR, 1, "Frontend (dummy) POWERDOWN");
break;
default:
- dprintk(MANTIS_ERROR, 1, "Invalid = (%d)", (u32 ) voltage);
+ dprintk(MANTIS_ERROR, 1, "Invalid = (%d)", (u32) voltage);
return -EINVAL;
}
mmwrite(0x00, MANTIS_GPIF_DOUT);
{
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!");
.bytes = 0,
.frontend_init = vp1034_frontend_init,
+ .power = GPIF_A12,
+ .reset = GPIF_A13,
};