Thomas Gleixner | c942fdd | 2019-05-27 08:55:06 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 2 | /* |
Antti Palosaari | cbdc80e | 2007-01-21 15:56:10 -0300 | [diff] [blame] | 3 | * Driver for Quantek QT1010 silicon tuner |
| 4 | * |
| 5 | * Copyright (C) 2006 Antti Palosaari <crope@iki.fi> |
| 6 | * Aapo Tahkola <aet@rasterburn.org> |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 7 | */ |
| 8 | |
Antti Palosaari | cbdc80e | 2007-01-21 15:56:10 -0300 | [diff] [blame] | 9 | #ifndef QT1010_H |
| 10 | #define QT1010_H |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 11 | |
Mauro Carvalho Chehab | fada193 | 2017-12-28 13:03:51 -0500 | [diff] [blame] | 12 | #include <media/dvb_frontend.h> |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 13 | |
Antti Palosaari | cbdc80e | 2007-01-21 15:56:10 -0300 | [diff] [blame] | 14 | struct qt1010_config { |
| 15 | u8 i2c_address; |
| 16 | }; |
| 17 | |
| 18 | /** |
| 19 | * Attach a qt1010 tuner to the supplied frontend structure. |
| 20 | * |
| 21 | * @param fe frontend to attach to |
| 22 | * @param i2c i2c adapter to use |
| 23 | * @param cfg tuner hw based configuration |
| 24 | * @return fe pointer on success, NULL on failure |
| 25 | */ |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 26 | #if IS_REACHABLE(CONFIG_MEDIA_TUNER_QT1010) |
Antti Palosaari | cbdc80e | 2007-01-21 15:56:10 -0300 | [diff] [blame] | 27 | extern struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe, |
| 28 | struct i2c_adapter *i2c, |
| 29 | struct qt1010_config *cfg); |
| 30 | #else |
| 31 | static inline struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe, |
| 32 | struct i2c_adapter *i2c, |
| 33 | struct qt1010_config *cfg) |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 34 | { |
Harvey Harrison | 271ddbf | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 35 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
Antti Palosaari | cbdc80e | 2007-01-21 15:56:10 -0300 | [diff] [blame] | 36 | return NULL; |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 37 | } |
Mauro Carvalho Chehab | 149ef72 | 2008-04-29 21:38:46 -0300 | [diff] [blame] | 38 | #endif // CONFIG_MEDIA_TUNER_QT1010 |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 39 | |
Michael Krufky | 017cf01 | 2006-09-23 20:40:20 -0300 | [diff] [blame] | 40 | #endif |