aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dibx000_common.h
diff options
context:
space:
mode:
authorOlivier Grenie <olivier.grenie@dibcom.fr>2011-01-04 02:28:59 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 19:31:41 -0400
commitdd316c6bacc2bdb22288507fd479bd2181eb7a7b (patch)
treeed91a38016ed0206833c7b1b0015c1be08c2a338 /drivers/media/dvb/frontends/dibx000_common.h
parent28fafca78797be701208c0880ec1c79ffa267f9d (diff)
[media] DIB9000: initial support added
This patchs add initial support for the DiB9000-device. This demodulator is firmware-driven. Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr> Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends/dibx000_common.h')
-rw-r--r--drivers/media/dvb/frontends/dibx000_common.h47
1 files changed, 46 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/dibx000_common.h b/drivers/media/dvb/frontends/dibx000_common.h
index b7ad066b7e52..c4fd62f8df51 100644
--- a/drivers/media/dvb/frontends/dibx000_common.h
+++ b/drivers/media/dvb/frontends/dibx000_common.h
@@ -219,6 +219,51 @@ struct dvb_frontend_parametersContext {
219 219
220#define FE_CALLBACK_TIME_NEVER 0xffffffff 220#define FE_CALLBACK_TIME_NEVER 0xffffffff
221 221
222#define ABS(x) ((x < 0) ? (-x) : (x)) 222#define ABS(x) ((x<0)?(-x):(x))
223
224#define DATA_BUS_ACCESS_MODE_8BIT 0x01
225#define DATA_BUS_ACCESS_MODE_16BIT 0x02
226#define DATA_BUS_ACCESS_MODE_NO_ADDRESS_INCREMENT 0x10
227
228struct dibGPIOFunction {
229#define BOARD_GPIO_COMPONENT_BUS_ADAPTER 1
230#define BOARD_GPIO_COMPONENT_DEMOD 2
231 u8 component;
232
233#define BOARD_GPIO_FUNCTION_BOARD_ON 1
234#define BOARD_GPIO_FUNCTION_BOARD_OFF 2
235#define BOARD_GPIO_FUNCTION_COMPONENT_ON 3
236#define BOARD_GPIO_FUNCTION_COMPONENT_OFF 4
237#define BOARD_GPIO_FUNCTION_SUBBAND_PWM 5
238#define BOARD_GPIO_FUNCTION_SUBBAND_GPIO 6
239 u8 function;
240
241/* mask, direction and value are used specify which GPIO to change GPIO0
242 * is LSB and possible GPIO31 is MSB. The same bit-position as in the
243 * mask is used for the direction and the value. Direction == 1 is OUT,
244 * 0 == IN. For direction "OUT" value is either 1 or 0, for direction IN
245 * value has no meaning.
246 *
247 * In case of BOARD_GPIO_FUNCTION_PWM mask is giving the GPIO to be
248 * used to do the PWM. Direction gives the PWModulator to be used.
249 * Value gives the PWM value in device-dependent scale.
250 */
251 u32 mask;
252 u32 direction;
253 u32 value;
254};
255
256#define MAX_NB_SUBBANDS 8
257struct dibSubbandSelection {
258 u8 size; /* Actual number of subbands. */
259 struct {
260 u16 f_mhz;
261 struct dibGPIOFunction gpio;
262 } subband[MAX_NB_SUBBANDS];
263};
264
265#define DEMOD_TIMF_SET 0x00
266#define DEMOD_TIMF_GET 0x01
267#define DEMOD_TIMF_UPDATE 0x02
223 268
224#endif 269#endif