m88rs2000.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. Driver for M88RS2000 demodulator
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. */
  15. #ifndef M88RS2000_H
  16. #define M88RS2000_H
  17. #include <linux/dvb/frontend.h>
  18. #include <media/dvb_frontend.h>
  19. struct m88rs2000_config {
  20. /* Demodulator i2c address */
  21. u8 demod_addr;
  22. u8 *inittab;
  23. /* minimum delay before retuning */
  24. int min_delay_ms;
  25. int (*set_ts_params)(struct dvb_frontend *, int);
  26. };
  27. enum {
  28. CALL_IS_SET_FRONTEND = 0x0,
  29. CALL_IS_READ,
  30. };
  31. #if IS_REACHABLE(CONFIG_DVB_M88RS2000)
  32. extern struct dvb_frontend *m88rs2000_attach(
  33. const struct m88rs2000_config *config, struct i2c_adapter *i2c);
  34. #else
  35. static inline struct dvb_frontend *m88rs2000_attach(
  36. const struct m88rs2000_config *config, struct i2c_adapter *i2c)
  37. {
  38. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  39. return NULL;
  40. }
  41. #endif /* CONFIG_DVB_M88RS2000 */
  42. #define RS2000_FE_CRYSTAL_KHZ 27000
  43. enum {
  44. DEMOD_WRITE = 0x1,
  45. WRITE_DELAY = 0x10,
  46. };
  47. #endif /* M88RS2000_H */