Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
| 3 | Driver for the Spase sp887x demodulator |
| 4 | */ |
| 5 | |
| 6 | #ifndef SP887X_H |
| 7 | #define SP887X_H |
| 8 | |
| 9 | #include <linux/dvb/frontend.h> |
| 10 | #include <linux/firmware.h> |
| 11 | |
| 12 | struct sp887x_config |
| 13 | { |
| 14 | /* the demodulator's i2c address */ |
| 15 | u8 demod_address; |
| 16 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | /* request firmware for device */ |
| 18 | int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); |
| 19 | }; |
| 20 | |
Arnd Bergmann | 9b17452 | 2015-02-18 14:12:42 -0300 | [diff] [blame] | 21 | #if IS_REACHABLE(CONFIG_DVB_SP887X) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | extern struct dvb_frontend* sp887x_attach(const struct sp887x_config* config, |
| 23 | struct i2c_adapter* i2c); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 24 | #else |
| 25 | static inline struct dvb_frontend* sp887x_attach(const struct sp887x_config* config, |
| 26 | struct i2c_adapter* i2c) |
| 27 | { |
Harvey Harrison | 271ddbf | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 28 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
Andrew de Quincey | 102a342 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 29 | return NULL; |
| 30 | } |
| 31 | #endif // CONFIG_DVB_SP887X |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
| 33 | #endif // SP887X_H |