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