1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef __ALTERA_CI_H
25#define __ALTERA_CI_H
26
27#include <linux/kconfig.h>
28
29#define ALT_DATA 0x000000ff
30#define ALT_TDI 0x00008000
31#define ALT_TDO 0x00004000
32#define ALT_TCK 0x00002000
33#define ALT_RDY 0x00001000
34#define ALT_RD 0x00000800
35#define ALT_WR 0x00000400
36#define ALT_AD_RG 0x00000200
37#define ALT_CS 0x00000100
38
39struct altera_ci_config {
40 void *dev;
41 void *adapter;
42 struct dvb_demux *demux;
43 int (*fpga_rw) (void *dev, int ad_rg, int val, int rw);
44};
45
46#if IS_ENABLED(CONFIG_MEDIA_ALTERA_CI)
47
48extern int altera_ci_init(struct altera_ci_config *config, int ci_nr);
49extern void altera_ci_release(void *dev, int ci_nr);
50extern int altera_ci_irq(void *dev);
51extern int altera_ci_tuner_reset(void *dev, int ci_nr);
52
53#else
54
55static inline int altera_ci_init(struct altera_ci_config *config, int ci_nr)
56{
57 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
58 return 0;
59}
60
61static inline void altera_ci_release(void *dev, int ci_nr)
62{
63 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
64}
65
66static inline int altera_ci_irq(void *dev)
67{
68 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
69 return 0;
70}
71
72static inline int altera_ci_tuner_reset(void *dev, int ci_nr)
73{
74 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
75 return 0;
76}
77
78#endif
79#if 0
80static inline int altera_hw_filt_init(struct altera_ci_config *config,
81 int hw_filt_nr)
82{
83 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
84 return 0;
85}
86
87static inline void altera_hw_filt_release(void *dev, int filt_nr)
88{
89 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
90}
91
92static inline int altera_pid_feed_control(void *dev, int filt_nr,
93 struct dvb_demux_feed *dvbdmxfeed, int onoff)
94{
95 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
96 return 0;
97}
98
99#endif
100
101#endif
102