Thomas Gleixner | 74ba920 | 2019-05-20 09:19:02 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
| 3 | Driver for STV0297 demodulator |
| 4 | |
| 5 | Copyright (C) 2003-2004 Dennis Noermann <dennis.noermann@noernet.de> |
| 6 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef STV0297_H |
| 10 | #define STV0297_H |
| 11 | |
| 12 | #include <linux/dvb/frontend.h> |
Mauro Carvalho Chehab | fada193 | 2017-12-28 13:03:51 -0500 | [diff] [blame] | 13 | #include <media/dvb_frontend.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
| 15 | struct stv0297_config |
| 16 | { |
| 17 | /* the demodulator's i2c address */ |
| 18 | u8 demod_address; |
| 19 | |
Andrew de Quincey | dc27a16 | 2005-09-09 13:03:07 -0700 | [diff] [blame] | 20 | /* inittab - array of pairs of values. |
| 21 | * First of each pair is the register, second is the value. |
| 22 | * List should be terminated with an 0xff, 0xff pair. |
| 23 | */ |
| 24 | u8* inittab; |
| 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | /* does the "inversion" need inverted? */ |
| 27 | u8 invert:1; |
Thomas Kaiser | b8d4c23 | 2006-04-27 21:45:20 -0300 | [diff] [blame] | 28 | |
| 29 | /* set to 1 if the device requires an i2c STOP during reading */ |
| 30 | u8 stop_during_read:1; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 33 | #if IS_REACHABLE(CONFIG_DVB_STV0297) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | extern struct dvb_frontend* stv0297_attach(const struct stv0297_config* config, |
Andrew de Quincey | dc27a16 | 2005-09-09 13:03:07 -0700 | [diff] [blame] | 35 | struct i2c_adapter* i2c); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 36 | #else |
| 37 | static inline struct dvb_frontend* stv0297_attach(const struct stv0297_config* config, |
| 38 | struct i2c_adapter* i2c) |
| 39 | { |
Harvey Harrison | 271ddbf | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 40 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 41 | return NULL; |
| 42 | } |
| 43 | #endif // CONFIG_DVB_STV0297 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
| 45 | #endif // STV0297_H |