Path: blob/master/drivers/media/video/cx23885/altera-ci.h
17778 views
/*1* altera-ci.c2*3* CI driver in conjunction with NetUp Dual DVB-T/C RF CI card4*5* Copyright (C) 2010 NetUP Inc.6* Copyright (C) 2010 Igor M. Liplianin <[email protected]>7*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License as published by10* the Free Software Foundation; either version 2 of the License, or11* (at your option) any later version.12*13* This program is distributed in the hope that it will be useful,14* but WITHOUT ANY WARRANTY; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16*17* GNU General Public License for more details.18*19* You should have received a copy of the GNU General Public License20* along with this program; if not, write to the Free Software21* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.22*/23#ifndef __ALTERA_CI_H24#define __ALTERA_CI_H2526#define ALT_DATA 0x000000ff27#define ALT_TDI 0x0000800028#define ALT_TDO 0x0000400029#define ALT_TCK 0x0000200030#define ALT_RDY 0x0000100031#define ALT_RD 0x0000080032#define ALT_WR 0x0000040033#define ALT_AD_RG 0x0000020034#define ALT_CS 0x000001003536struct altera_ci_config {37void *dev;/* main dev, for example cx23885_dev */38void *adapter;/* for CI to connect to */39struct dvb_demux *demux;/* for hardware PID filter to connect to */40int (*fpga_rw) (void *dev, int ad_rg, int val, int rw);41};4243#if defined(CONFIG_MEDIA_ALTERA_CI) || (defined(CONFIG_MEDIA_ALTERA_CI_MODULE) \44&& defined(MODULE))4546extern int altera_ci_init(struct altera_ci_config *config, int ci_nr);47extern void altera_ci_release(void *dev, int ci_nr);48extern int altera_ci_irq(void *dev);49extern int altera_ci_tuner_reset(void *dev, int ci_nr);5051#else5253static inline int altera_ci_init(struct altera_ci_config *config, int ci_nr)54{55printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);56return 0;57}5859static inline void altera_ci_release(void *dev, int ci_nr)60{61printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);62}6364static inline int altera_ci_irq(void *dev)65{66printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);67return 0;68}6970static inline int altera_ci_tuner_reset(void *dev, int ci_nr)71{72printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);73return 0;74}7576#endif77#if 078static inline int altera_hw_filt_init(struct altera_ci_config *config,79int hw_filt_nr)80{81printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);82return 0;83}8485static inline void altera_hw_filt_release(void *dev, int filt_nr)86{87printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);88}8990static inline int altera_pid_feed_control(void *dev, int filt_nr,91struct dvb_demux_feed *dvbdmxfeed, int onoff)92{93printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);94return 0;95}9697#endif /* CONFIG_MEDIA_ALTERA_CI */9899#endif /* __ALTERA_CI_H */100101102