Antti Palosaari | ca25cb5 | 2013-11-29 16:19:50 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Panasonic MN88472 DVB-T/T2/C demodulator driver |
| 3 | * |
| 4 | * Copyright (C) 2013 Antti Palosaari <crope@iki.fi> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | */ |
| 16 | |
| 17 | #ifndef MN88472_H |
| 18 | #define MN88472_H |
| 19 | |
| 20 | #include <linux/dvb/frontend.h> |
| 21 | |
Antti Palosaari | 8d1f38f | 2016-05-13 12:19:19 -0300 | [diff] [blame^] | 22 | /** |
| 23 | * struct mn88472_config - Platform data for the mn88472 driver |
| 24 | * @xtal: Clock frequency. |
| 25 | * @ts_mode: TS mode. |
| 26 | * @ts_clock: TS clock config. |
| 27 | * @i2c_wr_max: Max number of bytes driver writes to I2C at once. |
| 28 | * @get_dvb_frontend: Get DVB frontend. |
| 29 | */ |
Benjamin Larsson | 021cd2d | 2014-12-05 21:25:33 -0300 | [diff] [blame] | 30 | |
Antti Palosaari | 8d1f38f | 2016-05-13 12:19:19 -0300 | [diff] [blame^] | 31 | /* Define old names for backward compatibility */ |
| 32 | #define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE |
| 33 | #define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED |
| 34 | #define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL |
| 35 | #define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL |
Benjamin Larsson | 021cd2d | 2014-12-05 21:25:33 -0300 | [diff] [blame] | 36 | |
Antti Palosaari | 5ef1ad3 | 2014-10-25 22:23:09 -0300 | [diff] [blame] | 37 | struct mn88472_config { |
Antti Palosaari | 8d1f38f | 2016-05-13 12:19:19 -0300 | [diff] [blame^] | 38 | unsigned int xtal; |
Antti Palosaari | ca25cb5 | 2013-11-29 16:19:50 -0300 | [diff] [blame] | 39 | |
Antti Palosaari | 8d1f38f | 2016-05-13 12:19:19 -0300 | [diff] [blame^] | 40 | #define MN88472_TS_MODE_SERIAL 0 |
| 41 | #define MN88472_TS_MODE_PARALLEL 1 |
| 42 | int ts_mode; |
| 43 | |
| 44 | #define MN88472_TS_CLK_FIXED 0 |
| 45 | #define MN88472_TS_CLK_VARIABLE 1 |
| 46 | int ts_clock; |
| 47 | |
| 48 | u16 i2c_wr_max; |
Antti Palosaari | 528af19 | 2014-10-26 23:01:07 -0300 | [diff] [blame] | 49 | |
| 50 | /* Everything after that is returned by the driver. */ |
| 51 | |
| 52 | /* |
| 53 | * DVB frontend. |
| 54 | */ |
| 55 | struct dvb_frontend **fe; |
Antti Palosaari | 8d1f38f | 2016-05-13 12:19:19 -0300 | [diff] [blame^] | 56 | struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *); |
Antti Palosaari | 528af19 | 2014-10-26 23:01:07 -0300 | [diff] [blame] | 57 | }; |
Antti Palosaari | ca25cb5 | 2013-11-29 16:19:50 -0300 | [diff] [blame] | 58 | |
| 59 | #endif |