Mauro Carvalho Chehab | b9ede79 | 2010-09-27 20:52:43 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Fujitsu mb86a20s driver |
| 3 | * |
| 4 | * Copyright (C) 2010 Mauro Carvalho Chehab <mchehab@redhat.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation version 2. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | */ |
| 15 | |
| 16 | #ifndef MB86A20S_H |
| 17 | #define MB86A20S_H |
| 18 | |
Mauro Carvalho Chehab | 782d8b7 | 2013-03-21 16:11:54 -0300 | [diff] [blame] | 19 | #include <linux/kconfig.h> |
Mauro Carvalho Chehab | b9ede79 | 2010-09-27 20:52:43 -0300 | [diff] [blame] | 20 | #include <linux/dvb/frontend.h> |
| 21 | |
| 22 | /** |
| 23 | * struct mb86a20s_config - Define the per-device attributes of the frontend |
| 24 | * |
Mauro Carvalho Chehab | 0e4bbed | 2013-03-04 08:15:49 -0300 | [diff] [blame] | 25 | * @fclk: Clock frequency. If zero, assumes the default |
| 26 | * (32.57142 Mhz) |
Mauro Carvalho Chehab | b9ede79 | 2010-09-27 20:52:43 -0300 | [diff] [blame] | 27 | * @demod_address: the demodulator's i2c address |
Mauro Carvalho Chehab | 0e4bbed | 2013-03-04 08:15:49 -0300 | [diff] [blame] | 28 | * @is_serial: if true, TS is serial. Otherwise, TS is parallel |
Mauro Carvalho Chehab | b9ede79 | 2010-09-27 20:52:43 -0300 | [diff] [blame] | 29 | */ |
| 30 | |
| 31 | struct mb86a20s_config { |
Mauro Carvalho Chehab | 0e4bbed | 2013-03-04 08:15:49 -0300 | [diff] [blame] | 32 | u32 fclk; |
| 33 | u8 demod_address; |
| 34 | bool is_serial; |
Mauro Carvalho Chehab | b9ede79 | 2010-09-27 20:52:43 -0300 | [diff] [blame] | 35 | }; |
| 36 | |
Mauro Carvalho Chehab | 782d8b7 | 2013-03-21 16:11:54 -0300 | [diff] [blame] | 37 | #if IS_ENABLED(CONFIG_DVB_MB86A20S) |
Mauro Carvalho Chehab | b9ede79 | 2010-09-27 20:52:43 -0300 | [diff] [blame] | 38 | extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config, |
| 39 | struct i2c_adapter *i2c); |
| 40 | extern struct i2c_adapter *mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *); |
| 41 | #else |
| 42 | static inline struct dvb_frontend *mb86a20s_attach( |
| 43 | const struct mb86a20s_config *config, struct i2c_adapter *i2c) |
| 44 | { |
| 45 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 46 | return NULL; |
| 47 | } |
| 48 | static struct i2c_adapter * |
| 49 | mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *fe) |
| 50 | { |
| 51 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 52 | return NULL; |
| 53 | } |
| 54 | #endif |
| 55 | |
| 56 | #endif /* MB86A20S */ |