Michael Büsch | eea977e | 2012-04-02 12:14:32 -0300 | [diff] [blame] | 1 | #ifndef LINUX_FC0011_H_ |
| 2 | #define LINUX_FC0011_H_ |
| 3 | |
Mauro Carvalho Chehab | 9dc353c | 2013-03-21 16:24:09 -0300 | [diff] [blame] | 4 | #include <linux/kconfig.h> |
Michael Büsch | eea977e | 2012-04-02 12:14:32 -0300 | [diff] [blame] | 5 | #include "dvb_frontend.h" |
| 6 | |
| 7 | |
| 8 | /** struct fc0011_config - fc0011 hardware config |
| 9 | * |
| 10 | * @i2c_address: I2C bus address. |
| 11 | */ |
| 12 | struct fc0011_config { |
| 13 | u8 i2c_address; |
| 14 | }; |
| 15 | |
| 16 | /** enum fc0011_fe_callback_commands - Frontend callbacks |
| 17 | * |
| 18 | * @FC0011_FE_CALLBACK_POWER: Power on tuner hardware. |
| 19 | * @FC0011_FE_CALLBACK_RESET: Request a tuner reset. |
| 20 | */ |
| 21 | enum fc0011_fe_callback_commands { |
| 22 | FC0011_FE_CALLBACK_POWER, |
| 23 | FC0011_FE_CALLBACK_RESET, |
| 24 | }; |
| 25 | |
Mauro Carvalho Chehab | 9dc353c | 2013-03-21 16:24:09 -0300 | [diff] [blame] | 26 | #if IS_ENABLED(CONFIG_MEDIA_TUNER_FC0011) |
Michael Büsch | eea977e | 2012-04-02 12:14:32 -0300 | [diff] [blame] | 27 | struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, |
| 28 | struct i2c_adapter *i2c, |
| 29 | const struct fc0011_config *config); |
| 30 | #else |
| 31 | static inline |
| 32 | struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe, |
| 33 | struct i2c_adapter *i2c, |
| 34 | const struct fc0011_config *config) |
| 35 | { |
| 36 | dev_err(&i2c->dev, "fc0011 driver disabled in Kconfig\n"); |
| 37 | return NULL; |
| 38 | } |
| 39 | #endif |
| 40 | |
| 41 | #endif /* LINUX_FC0011_H_ */ |