m88rs2000.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 "dvb_frontend.h"
  19. struct m88rs2000_config {
  20. /* Demodulator i2c address */
  21. u8 demod_addr;
  22. /* Tuner address */
  23. u8 tuner_addr;
  24. u8 *inittab;
  25. /* minimum delay before retuning */
  26. int min_delay_ms;
  27. int (*set_ts_params)(struct dvb_frontend *, int);
  28. };
  29. enum {
  30. CALL_IS_SET_FRONTEND = 0x0,
  31. CALL_IS_READ,
  32. };
  33. #if defined(CONFIG_DVB_M88RS2000) || (defined(CONFIG_DVB_M88RS2000_MODULE) && \
  34. defined(MODULE))
  35. extern struct dvb_frontend *m88rs2000_attach(
  36. const struct m88rs2000_config *config, struct i2c_adapter *i2c);
  37. #else
  38. static inline struct dvb_frontend *m88rs2000_attach(
  39. const struct m88rs2000_config *config, struct i2c_adapter *i2c)
  40. {
  41. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  42. return NULL;
  43. }
  44. #endif /* CONFIG_DVB_M88RS2000 */
  45. #define FE_CRYSTAL_KHZ 27000
  46. #define FREQ_OFFSET_LOW_SYM_RATE 3000
  47. enum {
  48. DEMOD_WRITE = 0x1,
  49. TUNER_WRITE,
  50. WRITE_DELAY = 0x10,
  51. };
  52. #endif /* M88RS2000_H */