stv6110.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * stv6110.h
  3. *
  4. * Driver for ST STV6110 satellite tuner IC.
  5. *
  6. * Copyright (C) 2009 NetUP Inc.
  7. * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. *
  18. * GNU General Public License for more details.
  19. */
  20. #ifndef __DVB_STV6110_H__
  21. #define __DVB_STV6110_H__
  22. #include <linux/i2c.h>
  23. #include <media/dvb_frontend.h>
  24. /* registers */
  25. #define RSTV6110_CTRL1 0
  26. #define RSTV6110_CTRL2 1
  27. #define RSTV6110_TUNING1 2
  28. #define RSTV6110_TUNING2 3
  29. #define RSTV6110_CTRL3 4
  30. #define RSTV6110_STAT1 5
  31. #define RSTV6110_STAT2 6
  32. #define RSTV6110_STAT3 7
  33. struct stv6110_config {
  34. u8 i2c_address;
  35. u32 mclk;
  36. u8 gain;
  37. u8 clk_div; /* divisor value for the output clock */
  38. };
  39. #if IS_REACHABLE(CONFIG_DVB_STV6110)
  40. extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
  41. const struct stv6110_config *config,
  42. struct i2c_adapter *i2c);
  43. #else
  44. static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
  45. const struct stv6110_config *config,
  46. struct i2c_adapter *i2c)
  47. {
  48. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  49. return NULL;
  50. }
  51. #endif
  52. #endif