Thomas Gleixner | c942fdd | 2019-05-27 08:55:06 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Kirk Lapray | 04a4592 | 2005-11-08 21:35:46 -0800 | [diff] [blame] | 2 | /* |
| 3 | * Support for NXT2002 and NXT2004 - VSB/QAM |
| 4 | * |
| 5 | * Copyright (C) 2005 Kirk Lapray (kirk.lapray@gmail.com) |
| 6 | * based on nxt2002 by Taylor Jacob <rtjacob@earthlink.net> |
| 7 | * and nxt2004 by Jean-Francois Thibert (jeanfrancois@sagetv.com) |
Kirk Lapray | 04a4592 | 2005-11-08 21:35:46 -0800 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef NXT200X_H |
| 11 | #define NXT200X_H |
| 12 | |
| 13 | #include <linux/dvb/frontend.h> |
| 14 | #include <linux/firmware.h> |
| 15 | |
| 16 | typedef enum nxt_chip_t { |
| 17 | NXTUNDEFINED, |
| 18 | NXT2002, |
| 19 | NXT2004 |
| 20 | }nxt_chip_type; |
| 21 | |
| 22 | struct nxt200x_config |
| 23 | { |
| 24 | /* the demodulator's i2c address */ |
| 25 | u8 demod_address; |
| 26 | |
Kirk Lapray | 04a4592 | 2005-11-08 21:35:46 -0800 | [diff] [blame] | 27 | /* need to set device param for start_dma */ |
| 28 | int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured); |
| 29 | }; |
| 30 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 31 | #if IS_REACHABLE(CONFIG_DVB_NXT200X) |
Kirk Lapray | 04a4592 | 2005-11-08 21:35:46 -0800 | [diff] [blame] | 32 | extern struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, |
| 33 | struct i2c_adapter* i2c); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 34 | #else |
| 35 | static inline struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config, |
| 36 | struct i2c_adapter* i2c) |
| 37 | { |
Harvey Harrison | 271ddbf | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 38 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 39 | return NULL; |
| 40 | } |
| 41 | #endif // CONFIG_DVB_NXT200X |
Kirk Lapray | 04a4592 | 2005-11-08 21:35:46 -0800 | [diff] [blame] | 42 | |
| 43 | #endif /* NXT200X_H */ |