Matthias Schwarzott | 68b3289f | 2009-02-24 12:35:15 -0300 | [diff] [blame] | 1 | /** |
| 2 | * Driver for Zarlink ZL10036 DVB-S silicon tuner |
| 3 | * |
| 4 | * Copyright (C) 2006 Tino Reichardt |
| 5 | * Copyright (C) 2007-2009 Matthias Schwarzott <zzam@gentoo.de> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License Version 2, as |
| 9 | * published by the Free Software Foundation. |
| 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. |
Matthias Schwarzott | 68b3289f | 2009-02-24 12:35:15 -0300 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #ifndef DVB_ZL10036_H |
| 18 | #define DVB_ZL10036_H |
| 19 | |
| 20 | #include <linux/i2c.h> |
Mauro Carvalho Chehab | fada193 | 2017-12-28 13:03:51 -0500 | [diff] [blame] | 21 | #include <media/dvb_frontend.h> |
Matthias Schwarzott | 68b3289f | 2009-02-24 12:35:15 -0300 | [diff] [blame] | 22 | |
Matthias Schwarzott | 68b3289f | 2009-02-24 12:35:15 -0300 | [diff] [blame] | 23 | struct zl10036_config { |
| 24 | u8 tuner_address; |
| 25 | int rf_loop_enable; |
| 26 | }; |
| 27 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 28 | #if IS_REACHABLE(CONFIG_DVB_ZL10036) |
Mauro Carvalho Chehab | b95b0c9 | 2017-11-29 12:39:19 -0500 | [diff] [blame] | 29 | /** |
| 30 | * Attach a zl10036 tuner to the supplied frontend structure. |
| 31 | * |
| 32 | * @fe: Frontend to attach to. |
| 33 | * @config: zl10036_config structure. |
| 34 | * @i2c: pointer to struct i2c_adapter. |
| 35 | * return: FE pointer on success, NULL on failure. |
| 36 | */ |
Matthias Schwarzott | 68b3289f | 2009-02-24 12:35:15 -0300 | [diff] [blame] | 37 | extern struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe, |
| 38 | const struct zl10036_config *config, struct i2c_adapter *i2c); |
| 39 | #else |
| 40 | static inline struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe, |
| 41 | const struct zl10036_config *config, struct i2c_adapter *i2c) |
| 42 | { |
| 43 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 44 | return NULL; |
| 45 | } |
| 46 | #endif |
| 47 | |
| 48 | #endif /* DVB_ZL10036_H */ |