Ralph Metzler | 43dd07f | 2011-07-03 13:42:18 -0300 | [diff] [blame] | 1 | #ifndef _DRXK_H_ |
| 2 | #define _DRXK_H_ |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | #include <linux/i2c.h> |
| 6 | |
Mauro Carvalho Chehab | 147e110 | 2011-07-10 08:24:26 -0300 | [diff] [blame] | 7 | /** |
| 8 | * struct drxk_config - Configure the initial parameters for DRX-K |
| 9 | * |
| 10 | * adr: I2C Address of the DRX-K |
| 11 | * single_master: Device is on the single master mode |
| 12 | * no_i2c_bridge: Don't switch the I2C bridge to talk with tuner |
Mauro Carvalho Chehab | 90796ac | 2011-07-10 09:36:30 -0300 | [diff] [blame^] | 13 | * antenna_gpio: GPIO bit used to control the antenna |
| 14 | * antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1 |
| 15 | * means that 1=DVBC, 0 = DVBT. Zero means the opposite. |
Mauro Carvalho Chehab | 147e110 | 2011-07-10 08:24:26 -0300 | [diff] [blame] | 16 | * microcode_name: Name of the firmware file with the microcode |
Mauro Carvalho Chehab | 90796ac | 2011-07-10 09:36:30 -0300 | [diff] [blame^] | 17 | * |
| 18 | * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is |
| 19 | * UIO-3. |
Mauro Carvalho Chehab | 147e110 | 2011-07-10 08:24:26 -0300 | [diff] [blame] | 20 | */ |
Mauro Carvalho Chehab | 0fc55e8 | 2011-07-09 12:36:58 -0300 | [diff] [blame] | 21 | struct drxk_config { |
Mauro Carvalho Chehab | 147e110 | 2011-07-10 08:24:26 -0300 | [diff] [blame] | 22 | u8 adr; |
| 23 | bool single_master; |
| 24 | bool no_i2c_bridge; |
| 25 | |
Mauro Carvalho Chehab | 90796ac | 2011-07-10 09:36:30 -0300 | [diff] [blame^] | 26 | bool antenna_dvbt; |
| 27 | u16 antenna_gpio; |
Mauro Carvalho Chehab | 147e110 | 2011-07-10 08:24:26 -0300 | [diff] [blame] | 28 | |
Mauro Carvalho Chehab | e4f4f87 | 2011-07-09 17:35:26 -0300 | [diff] [blame] | 29 | const char *microcode_name; |
Mauro Carvalho Chehab | 0fc55e8 | 2011-07-09 12:36:58 -0300 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | extern struct dvb_frontend *drxk_attach(const struct drxk_config *config, |
| 33 | struct i2c_adapter *i2c, |
Ralph Metzler | 43dd07f | 2011-07-03 13:42:18 -0300 | [diff] [blame] | 34 | struct dvb_frontend **fe_t); |
| 35 | #endif |