Thomas Gleixner | 74ba920 | 2019-05-20 09:19:02 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Steve Toth | b79cb65 | 2006-01-09 15:25:07 -0200 | [diff] [blame] | 2 | /* |
| 3 | Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver |
| 4 | |
Steven Toth | 6d89761 | 2008-09-03 17:12:12 -0300 | [diff] [blame] | 5 | Copyright (C) 2005 Steven Toth <stoth@linuxtv.org> |
Steve Toth | b79cb65 | 2006-01-09 15:25:07 -0200 | [diff] [blame] | 6 | |
Steve Toth | b79cb65 | 2006-01-09 15:25:07 -0200 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef CX24123_H |
| 10 | #define CX24123_H |
| 11 | |
| 12 | #include <linux/dvb/frontend.h> |
| 13 | |
Steven Toth | 93504ab | 2008-10-16 20:28:32 -0300 | [diff] [blame] | 14 | struct cx24123_config { |
Steve Toth | b79cb65 | 2006-01-09 15:25:07 -0200 | [diff] [blame] | 15 | /* the demodulator's i2c address */ |
| 16 | u8 demod_address; |
| 17 | |
Steve Toth | b79cb65 | 2006-01-09 15:25:07 -0200 | [diff] [blame] | 18 | /* Need to set device param for start_dma */ |
Steven Toth | 93504ab | 2008-10-16 20:28:32 -0300 | [diff] [blame] | 19 | int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured); |
Yeasah Pell | ef76856 | 2006-09-26 12:30:14 -0300 | [diff] [blame] | 20 | |
| 21 | /* 0 = LNB voltage normal, 1 = LNB voltage inverted */ |
| 22 | int lnb_polarity; |
Patrick Boettcher | ca06fa7 | 2008-03-29 21:01:12 -0300 | [diff] [blame] | 23 | |
| 24 | /* this device has another tuner */ |
| 25 | u8 dont_use_pll; |
| 26 | void (*agc_callback) (struct dvb_frontend *); |
Steve Toth | b79cb65 | 2006-01-09 15:25:07 -0200 | [diff] [blame] | 27 | }; |
| 28 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 29 | #if IS_REACHABLE(CONFIG_DVB_CX24123) |
Patrick Boettcher | ca06fa7 | 2008-03-29 21:01:12 -0300 | [diff] [blame] | 30 | extern struct dvb_frontend *cx24123_attach(const struct cx24123_config *config, |
| 31 | struct i2c_adapter *i2c); |
| 32 | extern struct i2c_adapter *cx24123_get_tuner_i2c_adapter(struct dvb_frontend *); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 33 | #else |
Patrick Boettcher | ca06fa7 | 2008-03-29 21:01:12 -0300 | [diff] [blame] | 34 | static inline struct dvb_frontend *cx24123_attach( |
| 35 | const struct cx24123_config *config, struct i2c_adapter *i2c) |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 36 | { |
Patrick Boettcher | ca06fa7 | 2008-03-29 21:01:12 -0300 | [diff] [blame] | 37 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 38 | return NULL; |
| 39 | } |
Hans Verkuil | 8b012fc | 2015-04-27 04:29:53 -0300 | [diff] [blame] | 40 | static inline struct i2c_adapter * |
Patrick Boettcher | ca06fa7 | 2008-03-29 21:01:12 -0300 | [diff] [blame] | 41 | cx24123_get_tuner_i2c_adapter(struct dvb_frontend *fe) |
| 42 | { |
| 43 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 44 | return NULL; |
| 45 | } |
Steven Toth | 93504ab | 2008-10-16 20:28:32 -0300 | [diff] [blame] | 46 | #endif |
Steve Toth | b79cb65 | 2006-01-09 15:25:07 -0200 | [diff] [blame] | 47 | |
| 48 | #endif /* CX24123_H */ |