drxk.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. * @parallel_ts: True means that the device uses parallel TS,
  10. * Serial otherwise.
  11. * @dynamic_clk: True means that the clock will be dynamically
  12. * adjusted. Static clock otherwise.
  13. * @single_master: Device is on the single master mode
  14. * @no_i2c_bridge: Don't switch the I2C bridge to talk with tuner
  15. * @antenna_gpio: GPIO bit used to control the antenna
  16. * @antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1
  17. * means that 1=DVBC, 0 = DVBT. Zero means the opposite.
  18. * @microcode_name: Name of the firmware file with the microcode
  19. *
  20. * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is
  21. * UIO-3.
  22. */
  23. struct drxk_config {
  24. u8 adr;
  25. bool single_master;
  26. bool no_i2c_bridge;
  27. bool parallel_ts;
  28. bool dynamic_clk;
  29. bool antenna_dvbt;
  30. u16 antenna_gpio;
  31. int chunk_size;
  32. const char *microcode_name;
  33. };
  34. #if defined(CONFIG_DVB_DRXK) || (defined(CONFIG_DVB_DRXK_MODULE) \
  35. && defined(MODULE))
  36. extern struct dvb_frontend *drxk_attach(const struct drxk_config *config,
  37. struct i2c_adapter *i2c);
  38. #else
  39. static inline struct dvb_frontend *drxk_attach(const struct drxk_config *config,
  40. struct i2c_adapter *i2c)
  41. {
  42. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  43. return NULL;
  44. }
  45. #endif
  46. #endif