stv6110.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * stv6110.h
  4. *
  5. * Driver for ST STV6110 satellite tuner IC.
  6. *
  7. * Copyright (C) 2009 NetUP Inc.
  8. * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
  9. */
  10. #ifndef __DVB_STV6110_H__
  11. #define __DVB_STV6110_H__
  12. #include <linux/i2c.h>
  13. #include <media/dvb_frontend.h>
  14. /* registers */
  15. #define RSTV6110_CTRL1 0
  16. #define RSTV6110_CTRL2 1
  17. #define RSTV6110_TUNING1 2
  18. #define RSTV6110_TUNING2 3
  19. #define RSTV6110_CTRL3 4
  20. #define RSTV6110_STAT1 5
  21. #define RSTV6110_STAT2 6
  22. #define RSTV6110_STAT3 7
  23. struct stv6110_config {
  24. u8 i2c_address;
  25. u32 mclk;
  26. u8 gain;
  27. u8 clk_div; /* divisor value for the output clock */
  28. };
  29. #if IS_REACHABLE(CONFIG_DVB_STV6110)
  30. extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
  31. const struct stv6110_config *config,
  32. struct i2c_adapter *i2c);
  33. #else
  34. static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
  35. const struct stv6110_config *config,
  36. struct i2c_adapter *i2c)
  37. {
  38. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  39. return NULL;
  40. }
  41. #endif
  42. #endif