blob: e4f217747873960d2f6fc2312f34a8f116457cde [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001/* SPDX-License-Identifier: GPL-2.0-or-later */
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Panasonic MN88472 DVB-T/T2/C demodulator driver
4 *
5 * Copyright (C) 2013 Antti Palosaari <crope@iki.fi>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006 */
7
8#ifndef MN88472_H
9#define MN88472_H
10
11#include <linux/dvb/frontend.h>
12
13/* Define old names for backward compatibility */
14#define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE
15#define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED
16#define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL
17#define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL
18
19/**
20 * struct mn88472_config - Platform data for the mn88472 driver
21 * @xtal: Clock frequency.
22 * @ts_mode: TS mode.
23 * @ts_clock: TS clock config.
24 * @i2c_wr_max: Max number of bytes driver writes to I2C at once.
25 * @fe: pointer to a frontend pointer
26 * @get_dvb_frontend: Get DVB frontend callback.
27 */
28struct mn88472_config {
29 unsigned int xtal;
30
31#define MN88472_TS_MODE_SERIAL 0
32#define MN88472_TS_MODE_PARALLEL 1
33 int ts_mode;
34
35#define MN88472_TS_CLK_FIXED 0
36#define MN88472_TS_CLK_VARIABLE 1
37 int ts_clock;
38
39 u16 i2c_wr_max;
40
41 /* Everything after that is returned by the driver. */
42
43 /*
44 * DVB frontend.
45 */
46 struct dvb_frontend **fe;
47 struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
48};
49
50#endif