You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/usb/input.h>
|
||||
#include <linux/input.h>
|
||||
#include <media/ir-common.h>
|
||||
|
||||
#define IR_TAB_MIN_SIZE 32
|
||||
|
||||
@@ -144,7 +144,8 @@ static void set_audio(struct dvb_frontend *fe,
|
||||
}
|
||||
|
||||
if (params->mode == V4L2_TUNER_RADIO) {
|
||||
priv->tda8290_easy_mode = 0x01; /* Start with MN values */
|
||||
/* Set TDA8295 to FM radio; Start TDA8290 with MN values */
|
||||
priv->tda8290_easy_mode = (priv->ver & TDA8295) ? 0x80 : 0x01;
|
||||
tuner_dbg("setting to radio FM\n");
|
||||
} else {
|
||||
tuner_dbg("setting tda829x to system %s\n", mode);
|
||||
@@ -672,16 +673,19 @@ static int tda8290_probe(struct tuner_i2c_props *i2c_props)
|
||||
static int tda8295_probe(struct tuner_i2c_props *i2c_props)
|
||||
{
|
||||
#define TDA8295_ID 0x8a
|
||||
#define TDA8295C2_ID 0x8b
|
||||
unsigned char tda8295_id[] = { 0x2f, 0x00 };
|
||||
|
||||
/* detect tda8295 */
|
||||
tuner_i2c_xfer_send(i2c_props, &tda8295_id[0], 1);
|
||||
tuner_i2c_xfer_recv(i2c_props, &tda8295_id[1], 1);
|
||||
|
||||
if (tda8295_id[1] == TDA8295_ID) {
|
||||
if ((tda8295_id[1] & 0xfe) == TDA8295_ID) {
|
||||
if (debug)
|
||||
printk(KERN_DEBUG "%s: tda8295 detected @ %d-%04x\n",
|
||||
__func__, i2c_adapter_id(i2c_props->adap),
|
||||
printk(KERN_DEBUG "%s: %s detected @ %d-%04x\n",
|
||||
__func__, (tda8295_id[1] == TDA8295_ID) ?
|
||||
"tda8295c1" : "tda8295c2",
|
||||
i2c_adapter_id(i2c_props->adap),
|
||||
i2c_props->addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,10 @@ comment "Supported Earthsoft PT1 Adapters"
|
||||
depends on DVB_CORE && PCI && I2C
|
||||
source "drivers/media/dvb/pt1/Kconfig"
|
||||
|
||||
comment "Supported Mantis Adapters"
|
||||
depends on DVB_CORE && PCI && I2C
|
||||
source "drivers/media/dvb/mantis/Kconfig"
|
||||
|
||||
comment "Supported DVB Frontends"
|
||||
depends on DVB_CORE
|
||||
source "drivers/media/dvb/frontends/Kconfig"
|
||||
|
||||
@@ -2,6 +2,18 @@
|
||||
# Makefile for the kernel multimedia device drivers.
|
||||
#
|
||||
|
||||
obj-y := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dvb-usb/ pluto2/ siano/ dm1105/ pt1/
|
||||
obj-y := dvb-core/ \
|
||||
frontends/ \
|
||||
ttpci/ \
|
||||
ttusb-dec/ \
|
||||
ttusb-budget/ \
|
||||
b2c2/ \
|
||||
bt8xx/ \
|
||||
dvb-usb/ \
|
||||
pluto2/ \
|
||||
siano/ \
|
||||
dm1105/ \
|
||||
pt1/ \
|
||||
mantis/
|
||||
|
||||
obj-$(CONFIG_DVB_FIREDTV) += firewire/
|
||||
|
||||
@@ -202,14 +202,8 @@ static void handle_fcp(struct fw_card *card, struct fw_request *request,
|
||||
unsigned long flags;
|
||||
int su;
|
||||
|
||||
if ((tcode != TCODE_WRITE_QUADLET_REQUEST &&
|
||||
tcode != TCODE_WRITE_BLOCK_REQUEST) ||
|
||||
offset != CSR_REGISTER_BASE + CSR_FCP_RESPONSE ||
|
||||
length == 0 ||
|
||||
(((u8 *)payload)[0] & 0xf0) != 0) {
|
||||
fw_send_response(card, request, RCODE_TYPE_ERROR);
|
||||
if (length < 2 || (((u8 *)payload)[0] & 0xf0) != 0)
|
||||
return;
|
||||
}
|
||||
|
||||
su = ((u8 *)payload)[1] & 0x7;
|
||||
|
||||
@@ -230,10 +224,8 @@ static void handle_fcp(struct fw_card *card, struct fw_request *request,
|
||||
}
|
||||
spin_unlock_irqrestore(&node_list_lock, flags);
|
||||
|
||||
if (fdtv) {
|
||||
if (fdtv)
|
||||
avc_recv(fdtv, payload, length);
|
||||
fw_send_response(card, request, RCODE_COMPLETE);
|
||||
}
|
||||
}
|
||||
|
||||
static struct fw_address_handler fcp_handler = {
|
||||
|
||||
@@ -208,6 +208,14 @@ config DVB_DS3000
|
||||
help
|
||||
A DVB-S/S2 tuner module. Say Y when you want to support this frontend.
|
||||
|
||||
config DVB_MB86A16
|
||||
tristate "Fujitsu MB86A16 based"
|
||||
depends on DVB_CORE && I2C
|
||||
default m if DVB_FE_CUSTOMISE
|
||||
help
|
||||
A DVB-S/DSS Direct Conversion reveiver.
|
||||
Say Y when you want to support this frontend.
|
||||
|
||||
comment "DVB-T (terrestrial) frontends"
|
||||
depends on DVB_CORE
|
||||
|
||||
@@ -587,6 +595,17 @@ config DVB_ATBM8830
|
||||
help
|
||||
A DMB-TH tuner module. Say Y when you want to support this frontend.
|
||||
|
||||
config DVB_TDA665x
|
||||
tristate "TDA665x tuner"
|
||||
depends on DVB_CORE && I2C
|
||||
default m if DVB_FE_CUSTOMISE
|
||||
help
|
||||
Support for tuner modules based on Philips TDA6650/TDA6651 chips.
|
||||
Say Y when you want to support this chip.
|
||||
|
||||
Currently supported tuners:
|
||||
* Panasonic ENV57H12D5 (ET-50DT)
|
||||
|
||||
comment "Tools to develop new frontends"
|
||||
|
||||
config DVB_DUMMY_FE
|
||||
|
||||
@@ -64,6 +64,7 @@ obj-$(CONFIG_DVB_TDA10048) += tda10048.o
|
||||
obj-$(CONFIG_DVB_TUNER_CX24113) += cx24113.o
|
||||
obj-$(CONFIG_DVB_S5H1411) += s5h1411.o
|
||||
obj-$(CONFIG_DVB_LGS8GL5) += lgs8gl5.o
|
||||
obj-$(CONFIG_DVB_TDA665x) += tda665x.o
|
||||
obj-$(CONFIG_DVB_LGS8GXX) += lgs8gxx.o
|
||||
obj-$(CONFIG_DVB_ATBM8830) += atbm8830.o
|
||||
obj-$(CONFIG_DVB_DUMMY_FE) += dvb_dummy_fe.o
|
||||
@@ -80,3 +81,4 @@ obj-$(CONFIG_DVB_STV6110x) += stv6110x.o
|
||||
obj-$(CONFIG_DVB_ISL6423) += isl6423.o
|
||||
obj-$(CONFIG_DVB_EC100) += ec100.o
|
||||
obj-$(CONFIG_DVB_DS3000) += ds3000.o
|
||||
obj-$(CONFIG_DVB_MB86A16) += mb86a16.o
|
||||
|
||||
@@ -100,7 +100,7 @@ static inline int dib8000_set_tune_state(struct dvb_frontend *fe, enum frontend_
|
||||
static inline enum frontend_tune_state dib8000_get_tune_state(struct dvb_frontend *fe)
|
||||
{
|
||||
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
|
||||
return CT_SHUTDOWN,
|
||||
return CT_SHUTDOWN;
|
||||
}
|
||||
static inline void dib8000_pwm_agc_reset(struct dvb_frontend *fe)
|
||||
{
|
||||
|
||||
@@ -54,13 +54,13 @@ struct lgdt3305_config {
|
||||
u16 usref_qam256; /* default: 0x2a80 */
|
||||
|
||||
/* disable i2c repeater - 0:repeater enabled 1:repeater disabled */
|
||||
int deny_i2c_rptr:1;
|
||||
unsigned int deny_i2c_rptr:1;
|
||||
|
||||
/* spectral inversion - 0:disabled 1:enabled */
|
||||
int spectral_inversion:1;
|
||||
unsigned int spectral_inversion:1;
|
||||
|
||||
/* use RF AGC loop - 0:disabled 1:enabled */
|
||||
int rf_agc_loop:1;
|
||||
unsigned int rf_agc_loop:1;
|
||||
|
||||
enum lgdt3305_mpeg_mode mpeg_mode;
|
||||
enum lgdt3305_tp_clock_edge tpclk_edge;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Fujitsu MB86A16 DVB-S/DSS DC Receiver driver
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MB86A16_H
|
||||
#define __MB86A16_H
|
||||
|
||||
#include <linux/dvb/frontend.h>
|
||||
#include "dvb_frontend.h"
|
||||
|
||||
|
||||
struct mb86a16_config {
|
||||
u8 demod_address;
|
||||
|
||||
int (*set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#if defined(CONFIG_DVB_MB86A16) || (defined(CONFIG_DVB_MB86A16_MODULE) && defined(MODULE))
|
||||
|
||||
extern struct dvb_frontend *mb86a16_attach(const struct mb86a16_config *config,
|
||||
struct i2c_adapter *i2c_adap);
|
||||
|
||||
#else
|
||||
|
||||
static inline struct dvb_frontend *mb86a16_attach(const struct mb86a16_config *config,
|
||||
struct i2c_adapter *i2c_adap)
|
||||
{
|
||||
printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_DVB_MB86A16 */
|
||||
|
||||
#endif /* __MB86A16_H */
|
||||
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
Fujitsu MB86A16 DVB-S/DSS DC Receiver driver
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MB86A16_PRIV_H
|
||||
#define __MB86A16_PRIV_H
|
||||
|
||||
#define MB86A16_TSOUT 0x00
|
||||
#define MB86A16_TSOUT_HIZSEL (0x01 << 5)
|
||||
#define MB86A16_TSOUT_HIZCNTI (0x01 << 4)
|
||||
#define MB86A16_TSOUT_MODE (0x01 << 3)
|
||||
#define MB86A16_TSOUT_ORDER (0x01 << 2)
|
||||
#define MB86A16_TSOUT_ERROR (0x01 << 1)
|
||||
#define Mb86A16_TSOUT_EDGE (0x01 << 0)
|
||||
|
||||
#define MB86A16_FEC 0x01
|
||||
#define MB86A16_FEC_FSYNC (0x01 << 5)
|
||||
#define MB86A16_FEC_PCKB8 (0x01 << 4)
|
||||
#define MB86A16_FEC_DVDS (0x01 << 3)
|
||||
#define MB86A16_FEC_EREN (0x01 << 2)
|
||||
#define Mb86A16_FEC_RSEN (0x01 << 1)
|
||||
#define MB86A16_FEC_DIEN (0x01 << 0)
|
||||
|
||||
#define MB86A16_AGC 0x02
|
||||
#define MB86A16_AGC_AGMD (0x01 << 6)
|
||||
#define MB86A16_AGC_AGCW (0x0f << 2)
|
||||
#define MB86A16_AGC_AGCP (0x01 << 1)
|
||||
#define MB86A16_AGC_AGCR (0x01 << 0)
|
||||
|
||||
#define MB86A16_SRATE1 0x03
|
||||
#define MB86A16_SRATE1_DECI (0x07 << 2)
|
||||
#define MB86A16_SRATE1_CSEL (0x01 << 1)
|
||||
#define MB86A16_SRATE1_RSEL (0x01 << 0)
|
||||
|
||||
#define MB86A16_SRATE2 0x04
|
||||
#define MB86A16_SRATE2_STOFSL (0xff << 0)
|
||||
|
||||
#define MB86A16_SRATE3 0x05
|
||||
#define MB86A16_SRATE2_STOFSH (0xff << 0)
|
||||
|
||||
#define MB86A16_VITERBI 0x06
|
||||
#define MB86A16_FRAMESYNC 0x07
|
||||
#define MB86A16_CRLFILTCOEF1 0x08
|
||||
#define MB86A16_CRLFILTCOEF2 0x09
|
||||
#define MB86A16_STRFILTCOEF1 0x0a
|
||||
#define MB86A16_STRFILTCOEF2 0x0b
|
||||
#define MB86A16_RESET 0x0c
|
||||
#define MB86A16_STATUS 0x0d
|
||||
#define MB86A16_AFCML 0x0e
|
||||
#define MB86A16_AFCMH 0x0f
|
||||
#define MB86A16_BERMON 0x10
|
||||
#define MB86A16_BERTAB 0x11
|
||||
#define MB86A16_BERLSB 0x12
|
||||
#define MB86A16_BERMID 0x13
|
||||
#define MB86A16_BERMSB 0x14
|
||||
#define MB86A16_AGCM 0x15
|
||||
|
||||
#define MB86A16_DCC1 0x16
|
||||
#define MB86A16_DCC1_DISTA (0x01 << 7)
|
||||
#define MB86A16_DCC1_PRTY (0x01 << 6)
|
||||
#define MB86A16_DCC1_CTOE (0x01 << 5)
|
||||
#define MB86A16_DCC1_TBEN (0x01 << 4)
|
||||
#define MB86A16_DCC1_TBO (0x01 << 3)
|
||||
#define MB86A16_DCC1_NUM (0x07 << 0)
|
||||
|
||||
#define MB86A16_DCC2 0x17
|
||||
#define MB86A16_DCC2_DCBST (0x01 << 0)
|
||||
|
||||
#define MB86A16_DCC3 0x18
|
||||
#define MB86A16_DCC3_CODE0 (0xff << 0)
|
||||
|
||||
#define MB86A16_DCC4 0x19
|
||||
#define MB86A16_DCC4_CODE1 (0xff << 0)
|
||||
|
||||
#define MB86A16_DCC5 0x1a
|
||||
#define MB86A16_DCC5_CODE2 (0xff << 0)
|
||||
|
||||
#define MB86A16_DCC6 0x1b
|
||||
#define MB86A16_DCC6_CODE3 (0xff << 0)
|
||||
|
||||
#define MB86A16_DCC7 0x1c
|
||||
#define MB86A16_DCC7_CODE4 (0xff << 0)
|
||||
|
||||
#define MB86A16_DCC8 0x1d
|
||||
#define MB86A16_DCC8_CODE5 (0xff << 0)
|
||||
|
||||
#define MB86A16_DCCOUT 0x1e
|
||||
#define MB86A16_DCCOUT_DISEN (0x01 << 0)
|
||||
|
||||
#define MB86A16_TONEOUT1 0x1f
|
||||
#define MB86A16_TONE_TDIVL (0xff << 0)
|
||||
|
||||
#define MB86A16_TONEOUT2 0x20
|
||||
#define MB86A16_TONE_TMD (0x03 << 2)
|
||||
#define MB86A16_TONE_TDIVH (0x03 << 0)
|
||||
|
||||
#define MB86A16_FREQ1 0x21
|
||||
#define MB86A16_FREQ2 0x22
|
||||
#define MB86A16_FREQ3 0x23
|
||||
#define MB86A16_FREQ4 0x24
|
||||
#define MB86A16_FREQSET 0x25
|
||||
#define MB86A16_CNM 0x26
|
||||
#define MB86A16_PORT0 0x27
|
||||
#define MB86A16_PORT1 0x28
|
||||
#define MB86A16_DRCFILT 0x29
|
||||
#define MB86A16_AFC 0x2a
|
||||
#define MB86A16_AFCEXL 0x2b
|
||||
#define MB86A16_AFCEXH 0x2c
|
||||
#define MB86A16_DAGC 0x2d
|
||||
#define MB86A16_SEQMODE 0x32
|
||||
#define MB86A16_S0S1T 0x33
|
||||
#define MB86A16_S2S3T 0x34
|
||||
#define MB86A16_S4S5T 0x35
|
||||
#define MB86A16_CNTMR 0x36
|
||||
#define MB86A16_SIG1 0x37
|
||||
#define MB86A16_SIG2 0x38
|
||||
#define MB86A16_VIMAG 0x39
|
||||
#define MB86A16_VISET1 0x3a
|
||||
#define MB86A16_VISET2 0x3b
|
||||
#define MB86A16_VISET3 0x3c
|
||||
#define MB86A16_FAGCS1 0x3d
|
||||
#define MB86A16_FAGCS2 0x3e
|
||||
#define MB86A16_FAGCS3 0x3f
|
||||
#define MB86A16_FAGCS4 0x40
|
||||
#define MB86A16_FAGCS5 0x41
|
||||
#define MB86A16_FAGCS6 0x42
|
||||
#define MB86A16_CRM 0x43
|
||||
#define MB86A16_STRM 0x44
|
||||
#define MB86A16_DAGCML 0x45
|
||||
#define MB86A16_DAGCMH 0x46
|
||||
#define MB86A16_QPSKTST 0x49
|
||||
#define MB86A16_DISTMON 0x52
|
||||
#define MB86A16_VERSION 0x7f
|
||||
|
||||
#endif /* __MB86A16_PRIV_H */
|
||||
@@ -426,6 +426,10 @@ struct dvb_frontend* tda10021_attach(const struct tda1002x_config* config,
|
||||
id = tda10021_readreg(state, 0x1a);
|
||||
if ((id & 0xf0) != 0x70) goto error;
|
||||
|
||||
/* Don't claim TDA10023 */
|
||||
if (id == 0x7d)
|
||||
goto error;
|
||||
|
||||
printk("TDA10021: i2c-addr = 0x%02x, id = 0x%02x\n",
|
||||
state->config->demod_address, id);
|
||||
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
/*
|
||||
TDA665x tuner driver
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include "dvb_frontend.h"
|
||||
#include "tda665x.h"
|
||||
|
||||
struct tda665x_state {
|
||||
struct dvb_frontend *fe;
|
||||
struct i2c_adapter *i2c;
|
||||
const struct tda665x_config *config;
|
||||
|
||||
u32 frequency;
|
||||
u32 bandwidth;
|
||||
};
|
||||
|
||||
static int tda665x_read(struct tda665x_state *state, u8 *buf)
|
||||
{
|
||||
const struct tda665x_config *config = state->config;
|
||||
int err = 0;
|
||||
struct i2c_msg msg = { .addr = config->addr, .flags = I2C_M_RD, .buf = buf, .len = 2 };
|
||||
|
||||
err = i2c_transfer(state->i2c, &msg, 1);
|
||||
if (err != 1)
|
||||
goto exit;
|
||||
|
||||
return err;
|
||||
exit:
|
||||
printk(KERN_ERR "%s: I/O Error err=<%d>\n", __func__, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int tda665x_write(struct tda665x_state *state, u8 *buf, u8 length)
|
||||
{
|
||||
const struct tda665x_config *config = state->config;
|
||||
int err = 0;
|
||||
struct i2c_msg msg = { .addr = config->addr, .flags = 0, .buf = buf, .len = length };
|
||||
|
||||
err = i2c_transfer(state->i2c, &msg, 1);
|
||||
if (err != 1)
|
||||
goto exit;
|
||||
|
||||
return err;
|
||||
exit:
|
||||
printk(KERN_ERR "%s: I/O Error err=<%d>\n", __func__, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int tda665x_get_state(struct dvb_frontend *fe,
|
||||
enum tuner_param param,
|
||||
struct tuner_state *tstate)
|
||||
{
|
||||
struct tda665x_state *state = fe->tuner_priv;
|
||||
int err = 0;
|
||||
|
||||
switch (param) {
|
||||
case DVBFE_TUNER_FREQUENCY:
|
||||
tstate->frequency = state->frequency;
|
||||
break;
|
||||
case DVBFE_TUNER_BANDWIDTH:
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "%s: Unknown parameter (param=%d)\n", __func__, param);
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int tda665x_get_status(struct dvb_frontend *fe, u32 *status)
|
||||
{
|
||||
struct tda665x_state *state = fe->tuner_priv;
|
||||
u8 result = 0;
|
||||
int err = 0;
|
||||
|
||||
*status = 0;
|
||||
|
||||
err = tda665x_read(state, &result);
|
||||
if (err < 0)
|
||||
goto exit;
|
||||
|
||||
if ((result >> 6) & 0x01) {
|
||||
printk(KERN_DEBUG "%s: Tuner Phase Locked\n", __func__);
|
||||
*status = 1;
|
||||
}
|
||||
|
||||
return err;
|
||||
exit:
|
||||
printk(KERN_ERR "%s: I/O Error\n", __func__);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int tda665x_set_state(struct dvb_frontend *fe,
|
||||
enum tuner_param param,
|
||||
struct tuner_state *tstate)
|
||||
{
|
||||
struct tda665x_state *state = fe->tuner_priv;
|
||||
const struct tda665x_config *config = state->config;
|
||||
u32 frequency, status = 0;
|
||||
u8 buf[4];
|
||||
int err = 0;
|
||||
|
||||
if (param & DVBFE_TUNER_FREQUENCY) {
|
||||
|
||||
frequency = tstate->frequency;
|
||||
if ((frequency < config->frequency_max) || (frequency > config->frequency_min)) {
|
||||
printk(KERN_ERR "%s: Frequency beyond limits, frequency=%d\n", __func__, frequency);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
frequency += config->frequency_offst;
|
||||
frequency *= config->ref_multiplier;
|
||||
frequency += config->ref_divider >> 1;
|
||||
frequency /= config->ref_divider;
|
||||
|
||||
buf[0] = (u8) (frequency & 0x7f00) >> 8;
|
||||
buf[1] = (u8) (frequency & 0x00ff) >> 0;
|
||||
buf[2] = 0x80 | 0x40 | 0x02;
|
||||
buf[3] = 0x00;
|
||||
|
||||
/* restore frequency */
|
||||
frequency = tstate->frequency;
|
||||
|
||||
if (frequency < 153000000) {
|
||||
/* VHF-L */
|
||||
buf[3] |= 0x01; /* fc, Low Band, 47 - 153 MHz */
|
||||
if (frequency < 68000000)
|
||||
buf[3] |= 0x40; /* 83uA */
|
||||
if (frequency < 1040000000)
|
||||
buf[3] |= 0x60; /* 122uA */
|
||||
if (frequency < 1250000000)
|
||||
buf[3] |= 0x80; /* 163uA */
|
||||
else
|
||||
buf[3] |= 0xa0; /* 254uA */
|
||||
} else if (frequency < 438000000) {
|
||||
/* VHF-H */
|
||||
buf[3] |= 0x02; /* fc, Mid Band, 153 - 438 MHz */
|
||||
if (frequency < 230000000)
|
||||
buf[3] |= 0x40;
|
||||
if (frequency < 300000000)
|
||||
buf[3] |= 0x60;
|
||||
else
|
||||
buf[3] |= 0x80;
|
||||
} else {
|
||||
/* UHF */
|
||||
buf[3] |= 0x04; /* fc, High Band, 438 - 862 MHz */
|
||||
if (frequency < 470000000)
|
||||
buf[3] |= 0x60;
|
||||
if (frequency < 526000000)
|
||||
buf[3] |= 0x80;
|
||||
else
|
||||
buf[3] |= 0xa0;
|
||||
}
|
||||
|
||||
/* Set params */
|
||||
err = tda665x_write(state, buf, 5);
|
||||
if (err < 0)
|
||||
goto exit;
|
||||
|
||||
/* sleep for some time */
|
||||
printk(KERN_DEBUG "%s: Waiting to Phase LOCK\n", __func__);
|
||||
msleep(20);
|
||||
/* check status */
|
||||
err = tda665x_get_status(fe, &status);
|
||||
if (err < 0)
|
||||
goto exit;
|
||||
|
||||
if (status == 1) {
|
||||
printk(KERN_DEBUG "%s: Tuner Phase locked: status=%d\n", __func__, status);
|
||||
state->frequency = frequency; /* cache successful state */
|
||||
} else {
|
||||
printk(KERN_ERR "%s: No Phase lock: status=%d\n", __func__, status);
|
||||
}
|
||||
} else {
|
||||
printk(KERN_ERR "%s: Unknown parameter (param=%d)\n", __func__, param);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
exit:
|
||||
printk(KERN_ERR "%s: I/O Error\n", __func__);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int tda665x_release(struct dvb_frontend *fe)
|
||||
{
|
||||
struct tda665x_state *state = fe->tuner_priv;
|
||||
|
||||
fe->tuner_priv = NULL;
|
||||
kfree(state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dvb_tuner_ops tda665x_ops = {
|
||||
|
||||
.set_state = tda665x_set_state,
|
||||
.get_state = tda665x_get_state,
|
||||
.get_status = tda665x_get_status,
|
||||
.release = tda665x_release
|
||||
};
|
||||
|
||||
struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
|
||||
const struct tda665x_config *config,
|
||||
struct i2c_adapter *i2c)
|
||||
{
|
||||
struct tda665x_state *state = NULL;
|
||||
struct dvb_tuner_info *info;
|
||||
|
||||
state = kzalloc(sizeof(struct tda665x_state), GFP_KERNEL);
|
||||
if (state == NULL)
|
||||
goto exit;
|
||||
|
||||
state->config = config;
|
||||
state->i2c = i2c;
|
||||
state->fe = fe;
|
||||
fe->tuner_priv = state;
|
||||
fe->ops.tuner_ops = tda665x_ops;
|
||||
info = &fe->ops.tuner_ops.info;
|
||||
|
||||
memcpy(info->name, config->name, sizeof(config->name));
|
||||
info->frequency_min = config->frequency_min;
|
||||
info->frequency_max = config->frequency_max;
|
||||
info->frequency_step = config->frequency_offst;
|
||||
|
||||
printk(KERN_DEBUG "%s: Attaching TDA665x (%s) tuner\n", __func__, info->name);
|
||||
|
||||
return fe;
|
||||
|
||||
exit:
|
||||
kfree(state);
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(tda665x_attach);
|
||||
|
||||
MODULE_DESCRIPTION("TDA665x driver");
|
||||
MODULE_AUTHOR("Manu Abraham");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
TDA665x tuner driver
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __TDA665x_H
|
||||
#define __TDA665x_H
|
||||
|
||||
struct tda665x_config {
|
||||
char name[128];
|
||||
|
||||
u8 addr;
|
||||
u32 frequency_min;
|
||||
u32 frequency_max;
|
||||
u32 frequency_offst;
|
||||
u32 ref_multiplier;
|
||||
u32 ref_divider;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_DVB_TDA665x) || (defined(CONFIG_DVB_TDA665x_MODULE) && defined(MODULE))
|
||||
|
||||
extern struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
|
||||
const struct tda665x_config *config,
|
||||
struct i2c_adapter *i2c);
|
||||
|
||||
#else
|
||||
|
||||
static inline struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
|
||||
const struct tda665x_config *config,
|
||||
struct i2c_adapter *i2c)
|
||||
{
|
||||
printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_DVB_TDA665x */
|
||||
|
||||
#endif /* __TDA665x_H */
|
||||
@@ -0,0 +1,32 @@
|
||||
config MANTIS_CORE
|
||||
tristate "Mantis/Hopper PCI bridge based devices"
|
||||
depends on PCI && I2C && INPUT
|
||||
|
||||
help
|
||||
Support for PCI cards based on the Mantis and Hopper PCi bridge.
|
||||
|
||||
Say Y if you own such a device and want to use it.
|
||||
|
||||
config DVB_MANTIS
|
||||
tristate "MANTIS based cards"
|
||||
depends on MANTIS_CORE && DVB_CORE && PCI && I2C
|
||||
select DVB_MB86A16
|
||||
select DVB_ZL10353
|
||||
select DVB_STV0299
|
||||
select DVB_PLL
|
||||
help
|
||||
Support for PCI cards based on the Mantis PCI bridge.
|
||||
Say Y when you have a Mantis based DVB card and want to use it.
|
||||
|
||||
If unsure say N.
|
||||
|
||||
config DVB_HOPPER
|
||||
tristate "HOPPER based cards"
|
||||
depends on MANTIS_CORE && DVB_CORE && PCI && I2C
|
||||
select DVB_ZL10353
|
||||
select DVB_PLL
|
||||
help
|
||||
Support for PCI cards based on the Hopper PCI bridge.
|
||||
Say Y when you have a Hopper based DVB card and want to use it.
|
||||
|
||||
If unsure say N
|
||||
@@ -0,0 +1,28 @@
|
||||
mantis_core-objs := mantis_ioc.o \
|
||||
mantis_uart.o \
|
||||
mantis_dma.o \
|
||||
mantis_pci.o \
|
||||
mantis_i2c.o \
|
||||
mantis_dvb.o \
|
||||
mantis_evm.o \
|
||||
mantis_hif.o \
|
||||
mantis_ca.o \
|
||||
mantis_pcmcia.o \
|
||||
mantis_input.o
|
||||
|
||||
mantis-objs := mantis_cards.o \
|
||||
mantis_vp1033.o \
|
||||
mantis_vp1034.o \
|
||||
mantis_vp1041.o \
|
||||
mantis_vp2033.o \
|
||||
mantis_vp2040.o \
|
||||
mantis_vp3030.o
|
||||
|
||||
hopper-objs := hopper_cards.o \
|
||||
hopper_vp3028.o
|
||||
|
||||
obj-$(CONFIG_MANTIS_CORE) += mantis_core.o
|
||||
obj-$(CONFIG_DVB_MANTIS) += mantis.o
|
||||
obj-$(CONFIG_DVB_HOPPER) += hopper.o
|
||||
|
||||
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
|
||||
@@ -0,0 +1,275 @@
|
||||
/*
|
||||
Hopper PCI bridge driver
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pci.h>
|
||||
#include <asm/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include "dmxdev.h"
|
||||
#include "dvbdev.h"
|
||||
#include "dvb_demux.h"
|
||||
#include "dvb_frontend.h"
|
||||
#include "dvb_net.h"
|
||||
|
||||
#include "mantis_common.h"
|
||||
#include "hopper_vp3028.h"
|
||||
#include "mantis_dma.h"
|
||||
#include "mantis_dvb.h"
|
||||
#include "mantis_uart.h"
|
||||
#include "mantis_ioc.h"
|
||||
#include "mantis_pci.h"
|
||||
#include "mantis_i2c.h"
|
||||
#include "mantis_reg.h"
|
||||
|
||||
static unsigned int verbose;
|
||||
module_param(verbose, int, 0644);
|
||||
MODULE_PARM_DESC(verbose, "verbose startup messages, default is 1 (yes)");
|
||||
|
||||
#define DRIVER_NAME "Hopper"
|
||||
|
||||
static char *label[10] = {
|
||||
"DMA",
|
||||
"IRQ-0",
|
||||
"IRQ-1",
|
||||
"OCERR",
|
||||
"PABRT",
|
||||
"RIPRR",
|
||||
"PPERR",
|
||||
"FTRGT",
|
||||
"RISCI",
|
||||
"RACK"
|
||||
};
|
||||
|
||||
static int devs;
|
||||
|
||||
static irqreturn_t hopper_irq_handler(int irq, void *dev_id)
|
||||
{
|
||||
u32 stat = 0, mask = 0, lstat = 0, mstat = 0;
|
||||
u32 rst_stat = 0, rst_mask = 0;
|
||||
|
||||
struct mantis_pci *mantis;
|
||||
struct mantis_ca *ca;
|
||||
|
||||
mantis = (struct mantis_pci *) dev_id;
|
||||
if (unlikely(mantis == NULL)) {
|
||||
dprintk(MANTIS_ERROR, 1, "Mantis == NULL");
|
||||
return IRQ_NONE;
|
||||
}
|
||||
ca = mantis->mantis_ca;
|
||||
|
||||
stat = mmread(MANTIS_INT_STAT);
|
||||
mask = mmread(MANTIS_INT_MASK);
|
||||
mstat = lstat = stat & ~MANTIS_INT_RISCSTAT;
|
||||
if (!(stat & mask))
|
||||
return IRQ_NONE;
|
||||
|
||||
rst_mask = MANTIS_GPIF_WRACK |
|
||||
MANTIS_GPIF_OTHERR |
|
||||
MANTIS_SBUF_WSTO |
|
||||
MANTIS_GPIF_EXTIRQ;
|
||||
|
||||
rst_stat = mmread(MANTIS_GPIF_STATUS);
|
||||
rst_stat &= rst_mask;
|
||||
mmwrite(rst_stat, MANTIS_GPIF_STATUS);
|
||||
|
||||
mantis->mantis_int_stat = stat;
|
||||
mantis->mantis_int_mask = mask;
|
||||
dprintk(MANTIS_DEBUG, 0, "\n-- Stat=<%02x> Mask=<%02x> --", stat, mask);
|
||||
if (stat & MANTIS_INT_RISCEN) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[0]);
|
||||
}
|
||||
if (stat & MANTIS_INT_IRQ0) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[1]);
|
||||
mantis->gpif_status = rst_stat;
|
||||
wake_up(&ca->hif_write_wq);
|
||||
schedule_work(&ca->hif_evm_work);
|
||||
}
|
||||
if (stat & MANTIS_INT_IRQ1) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[2]);
|
||||
schedule_work(&mantis->uart_work);
|
||||
}
|
||||
if (stat & MANTIS_INT_OCERR) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[3]);
|
||||
}
|
||||
if (stat & MANTIS_INT_PABORT) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[4]);
|
||||
}
|
||||
if (stat & MANTIS_INT_RIPERR) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[5]);
|
||||
}
|
||||
if (stat & MANTIS_INT_PPERR) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[6]);
|
||||
}
|
||||
if (stat & MANTIS_INT_FTRGT) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[7]);
|
||||
}
|
||||
if (stat & MANTIS_INT_RISCI) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[8]);
|
||||
mantis->finished_block = (stat & MANTIS_INT_RISCSTAT) >> 28;
|
||||
tasklet_schedule(&mantis->tasklet);
|
||||
}
|
||||
if (stat & MANTIS_INT_I2CDONE) {
|
||||
dprintk(MANTIS_DEBUG, 0, "<%s>", label[9]);
|
||||
wake_up(&mantis->i2c_wq);
|
||||
}
|
||||
mmwrite(stat, MANTIS_INT_STAT);
|
||||
stat &= ~(MANTIS_INT_RISCEN | MANTIS_INT_I2CDONE |
|
||||
MANTIS_INT_I2CRACK | MANTIS_INT_PCMCIA7 |
|
||||
MANTIS_INT_PCMCIA6 | MANTIS_INT_PCMCIA5 |
|
||||
MANTIS_INT_PCMCIA4 | MANTIS_INT_PCMCIA3 |
|
||||
MANTIS_INT_PCMCIA2 | MANTIS_INT_PCMCIA1 |
|
||||
MANTIS_INT_PCMCIA0 | MANTIS_INT_IRQ1 |
|
||||
MANTIS_INT_IRQ0 | MANTIS_INT_OCERR |
|
||||
MANTIS_INT_PABORT | MANTIS_INT_RIPERR |
|
||||
MANTIS_INT_PPERR | MANTIS_INT_FTRGT |
|
||||
MANTIS_INT_RISCI);
|
||||
|
||||
if (stat)
|
||||
dprintk(MANTIS_DEBUG, 0, "<Unknown> Stat=<%02x> Mask=<%02x>", stat, mask);
|
||||
|
||||
dprintk(MANTIS_DEBUG, 0, "\n");
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int __devinit hopper_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
|
||||
{
|
||||
struct mantis_pci *mantis;
|
||||
struct mantis_hwconfig *config;
|
||||
int err = 0;
|
||||
|
||||
mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
|
||||
if (mantis == NULL) {
|
||||
printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
|
||||
err = -ENOMEM;
|
||||
goto fail0;
|
||||
}
|
||||
|
||||
mantis->num = devs;
|
||||
mantis->verbose = verbose;
|
||||
mantis->pdev = pdev;
|
||||
config = (struct mantis_hwconfig *) pci_id->driver_data;
|
||||
config->irq_handler = &hopper_irq_handler;
|
||||
mantis->hwconfig = config;
|
||||
|
||||
err = mantis_pci_init(mantis);
|
||||
if (err) {
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis PCI initialization failed <%d>", err);
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
err = mantis_stream_control(mantis, STREAM_TO_HIF);
|
||||
if (err < 0) {
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis stream control failed <%d>", err);
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
err = mantis_i2c_init(mantis);
|
||||
if (err < 0) {
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis I2C initialization failed <%d>", err);
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
err = mantis_get_mac(mantis);
|
||||
if (err < 0) {
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis MAC address read failed <%d>", err);
|
||||
goto fail2;
|
||||
}
|
||||
|
||||
err = mantis_dma_init(mantis);
|
||||
if (err < 0) {
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis DMA initialization failed <%d>", err);
|
||||
goto fail3;
|
||||
}
|
||||
|
||||
err = mantis_dvb_init(mantis);
|
||||
if (err < 0) {
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis DVB initialization failed <%d>", err);
|
||||
goto fail4;
|
||||
}
|
||||
devs++;
|
||||
|
||||
return err;
|
||||
|
||||
fail4:
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis DMA exit! <%d>", err);
|
||||
mantis_dma_exit(mantis);
|
||||
|
||||
fail3:
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis I2C exit! <%d>", err);
|
||||
mantis_i2c_exit(mantis);
|
||||
|
||||
fail2:
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis PCI exit! <%d>", err);
|
||||
mantis_pci_exit(mantis);
|
||||
|
||||
fail1:
|
||||
dprintk(MANTIS_ERROR, 1, "ERROR: Mantis free! <%d>", err);
|
||||
kfree(mantis);
|
||||
|
||||
fail0:
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __devexit hopper_pci_remove(struct pci_dev *pdev)
|
||||
{
|
||||
struct mantis_pci *mantis = pci_get_drvdata(pdev);
|
||||
|
||||
if (mantis) {
|
||||
mantis_dvb_exit(mantis);
|
||||
mantis_dma_exit(mantis);
|
||||
mantis_i2c_exit(mantis);
|
||||
mantis_pci_exit(mantis);
|
||||
kfree(mantis);
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
static struct pci_device_id hopper_pci_table[] = {
|
||||
MAKE_ENTRY(TWINHAN_TECHNOLOGIES, MANTIS_VP_3028_DVB_T, &vp3028_config),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct pci_driver hopper_pci_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.id_table = hopper_pci_table,
|
||||
.probe = hopper_pci_probe,
|
||||
.remove = hopper_pci_remove,
|
||||
};
|
||||
|
||||
static int __devinit hopper_init(void)
|
||||
{
|
||||
return pci_register_driver(&hopper_pci_driver);
|
||||
}
|
||||
|
||||
static void __devexit hopper_exit(void)
|
||||
{
|
||||
return pci_unregister_driver(&hopper_pci_driver);
|
||||
}
|
||||
|
||||
module_init(hopper_init);
|
||||
module_exit(hopper_exit);
|
||||
|
||||
MODULE_DESCRIPTION("HOPPER driver");
|
||||
MODULE_AUTHOR("Manu Abraham");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
Hopper VP-3028 driver
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/signal.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include "dmxdev.h"
|
||||
#include "dvbdev.h"
|
||||
#include "dvb_demux.h"
|
||||
#include "dvb_frontend.h"
|
||||
#include "dvb_net.h"
|
||||
|
||||
#include "zl10353.h"
|
||||
#include "mantis_common.h"
|
||||
#include "mantis_ioc.h"
|
||||
#include "mantis_dvb.h"
|
||||
#include "hopper_vp3028.h"
|
||||
|
||||
struct zl10353_config hopper_vp3028_config = {
|
||||
.demod_address = 0x0f,
|
||||
};
|
||||
|
||||
#define MANTIS_MODEL_NAME "VP-3028"
|
||||
#define MANTIS_DEV_TYPE "DVB-T"
|
||||
|
||||
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);
|
||||
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;
|
||||
}
|
||||
|
||||
struct mantis_hwconfig vp3028_config = {
|
||||
.model_name = MANTIS_MODEL_NAME,
|
||||
.dev_type = MANTIS_DEV_TYPE,
|
||||
.ts_size = MANTIS_TS_188,
|
||||
|
||||
.baud_rate = MANTIS_BAUD_9600,
|
||||
.parity = MANTIS_PARITY_NONE,
|
||||
.bytes = 0,
|
||||
|
||||
.frontend_init = vp3028_frontend_init,
|
||||
.power = GPIF_A00,
|
||||
.reset = GPIF_A03,
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
Hopper VP-3028 driver
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __MANTIS_VP3028_H
|
||||
#define __MANTIS_VP3028_H
|
||||
|
||||
#include "mantis_common.h"
|
||||
|
||||
#define MANTIS_VP_3028_DVB_T 0x0028
|
||||
|
||||
extern struct mantis_hwconfig vp3028_config;
|
||||
|
||||
#endif /* __MANTIS_VP3028_H */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user