stv6110.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. */
  24. #ifndef __DVB_STV6110_H__
  25. #define __DVB_STV6110_H__
  26. #include <linux/kconfig.h>
  27. #include <linux/i2c.h>
  28. #include "dvb_frontend.h"
  29. /* registers */
  30. #define RSTV6110_CTRL1 0
  31. #define RSTV6110_CTRL2 1
  32. #define RSTV6110_TUNING1 2
  33. #define RSTV6110_TUNING2 3
  34. #define RSTV6110_CTRL3 4
  35. #define RSTV6110_STAT1 5
  36. #define RSTV6110_STAT2 6
  37. #define RSTV6110_STAT3 7
  38. struct stv6110_config {
  39. u8 i2c_address;
  40. u32 mclk;
  41. u8 gain;
  42. u8 clk_div; /* divisor value for the output clock */
  43. };
  44. #if IS_REACHABLE(CONFIG_DVB_STV6110)
  45. extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
  46. const struct stv6110_config *config,
  47. struct i2c_adapter *i2c);
  48. #else
  49. static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
  50. const struct stv6110_config *config,
  51. struct i2c_adapter *i2c)
  52. {
  53. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  54. return NULL;
  55. }
  56. #endif
  57. #endif