1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * CI driver in conjunction with NetUp Dual DVB-T/C RF CI card
7 * Copyright (C) 2010 NetUP Inc.
8 * Copyright (C) 2010 Igor M. Liplianin <liplianin@netup.ru>
13 #define ALT_DATA 0x000000ff
14 #define ALT_TDI 0x00008000
15 #define ALT_TDO 0x00004000
16 #define ALT_TCK 0x00002000
17 #define ALT_RDY 0x00001000
18 #define ALT_RD 0x00000800
19 #define ALT_WR 0x00000400
20 #define ALT_AD_RG 0x00000200
21 #define ALT_CS 0x00000100
23 struct altera_ci_config
{
24 void *dev
;/* main dev, for example cx23885_dev */
25 void *adapter
;/* for CI to connect to */
26 struct dvb_demux
*demux
;/* for hardware PID filter to connect to */
27 int (*fpga_rw
) (void *dev
, int ad_rg
, int val
, int rw
);
30 #if IS_REACHABLE(CONFIG_MEDIA_ALTERA_CI)
32 extern int altera_ci_init(struct altera_ci_config
*config
, int ci_nr
);
33 extern void altera_ci_release(void *dev
, int ci_nr
);
34 extern int altera_ci_irq(void *dev
);
35 extern int altera_ci_tuner_reset(void *dev
, int ci_nr
);
39 static inline int altera_ci_init(struct altera_ci_config
*config
, int ci_nr
)
41 pr_warn("%s: driver disabled by Kconfig\n", __func__
);
45 static inline void altera_ci_release(void *dev
, int ci_nr
)
47 pr_warn("%s: driver disabled by Kconfig\n", __func__
);
50 static inline int altera_ci_irq(void *dev
)
52 pr_warn("%s: driver disabled by Kconfig\n", __func__
);
56 static inline int altera_ci_tuner_reset(void *dev
, int ci_nr
)
58 pr_warn("%s: driver disabled by Kconfig\n", __func__
);
64 static inline int altera_hw_filt_init(struct altera_ci_config
*config
,
67 pr_warn("%s: driver disabled by Kconfig\n", __func__
);
71 static inline void altera_hw_filt_release(void *dev
, int filt_nr
)
73 pr_warn("%s: driver disabled by Kconfig\n", __func__
);
76 static inline int altera_pid_feed_control(void *dev
, int filt_nr
,
77 struct dvb_demux_feed
*dvbdmxfeed
, int onoff
)
79 pr_warn("%s: driver disabled by Kconfig\n", __func__
);
83 #endif /* CONFIG_MEDIA_ALTERA_CI */
85 #endif /* __ALTERA_CI_H */