These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / media / platform / sti / c8sectpfe / c8sectpfe-common.h
1 /*
2  * c8sectpfe-common.h - C8SECTPFE STi DVB driver
3  *
4  * Copyright (c) STMicroelectronics 2015
5  *
6  *   Author: Peter Griffin <peter.griffin@linaro.org>
7  *
8  *      This program is free software; you can redistribute it and/or
9  *      modify it under the terms of the GNU General Public License as
10  *      published by the Free Software Foundation; either version 2 of
11  *      the License, or (at your option) any later version.
12  */
13 #ifndef _C8SECTPFE_COMMON_H_
14 #define _C8SECTPFE_COMMON_H_
15
16 #include <linux/dvb/dmx.h>
17 #include <linux/dvb/frontend.h>
18 #include <linux/gpio.h>
19 #include <linux/version.h>
20
21 #include "dmxdev.h"
22 #include "dvb_demux.h"
23 #include "dvb_frontend.h"
24 #include "dvb_net.h"
25
26 /* Maximum number of channels */
27 #define C8SECTPFE_MAXADAPTER (4)
28 #define C8SECTPFE_MAXCHANNEL 64
29 #define STPTI_MAXCHANNEL 64
30
31 #define MAX_INPUTBLOCKS 7
32
33 struct c8sectpfe;
34 struct stdemux;
35
36 struct stdemux {
37         struct dvb_demux        dvb_demux;
38         struct dmxdev           dmxdev;
39         struct dmx_frontend     hw_frontend;
40         struct dmx_frontend     mem_frontend;
41         int                     tsin_index;
42         int                     running_feed_count;
43         struct                  c8sectpfei *c8sectpfei;
44 };
45
46 struct c8sectpfe {
47         struct stdemux demux[MAX_INPUTBLOCKS];
48         struct mutex lock;
49         struct dvb_adapter adapter;
50         struct device *device;
51         int mapping;
52         int num_feeds;
53 };
54
55 /* Channel registration */
56 int c8sectpfe_tuner_register_frontend(struct c8sectpfe **c8sectpfe,
57                                         struct c8sectpfei *fei,
58                                         void *start_feed,
59                                         void *stop_feed);
60
61 void c8sectpfe_tuner_unregister_frontend(struct c8sectpfe *c8sectpfe,
62                                                 struct c8sectpfei *fei);
63
64 #endif