drxk.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _DRXK_H_
  2. #define _DRXK_H_
  3. #include <linux/types.h>
  4. #include <linux/i2c.h>
  5. /**
  6. * struct drxk_config - Configure the initial parameters for DRX-K
  7. *
  8. * adr: I2C Address of the DRX-K
  9. * single_master: Device is on the single master mode
  10. * no_i2c_bridge: Don't switch the I2C bridge to talk with tuner
  11. * antenna_gpio: GPIO bit used to control the antenna
  12. * antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1
  13. * means that 1=DVBC, 0 = DVBT. Zero means the opposite.
  14. * microcode_name: Name of the firmware file with the microcode
  15. *
  16. * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
  17. * UIO-3.
  18. */
  19. struct drxk_config {
  20. u8 adr;
  21. bool single_master;
  22. bool no_i2c_bridge;
  23. bool antenna_dvbt;
  24. u16 antenna_gpio;
  25. const char *microcode_name;
  26. };
  27. #if defined(CONFIG_DVB_DRXK) || (defined(CONFIG_DVB_DRXK_MODULE) \
  28. && defined(MODULE))
  29. extern struct dvb_frontend *drxk_attach(const struct drxk_config *config,
  30. struct i2c_adapter *i2c,
  31. struct dvb_frontend **fe_t);
  32. #else
  33. static inline struct dvb_frontend *drxk_attach(const struct drxk_config *config,
  34. struct i2c_adapter *i2c,
  35. struct dvb_frontend **fe_t)
  36. {
  37. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  38. return NULL;
  39. }
  40. #endif
  41. #endif