tda8261.h 951 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. TDA8261 8PSK/QPSK tuner driver
  4. Copyright (C) Manu Abraham (abraham.manu@gmail.com)
  5. */
  6. #ifndef __TDA8261_H
  7. #define __TDA8261_H
  8. enum tda8261_step {
  9. TDA8261_STEP_2000 = 0, /* 2000 kHz */
  10. TDA8261_STEP_1000, /* 1000 kHz */
  11. TDA8261_STEP_500, /* 500 kHz */
  12. TDA8261_STEP_250, /* 250 kHz */
  13. TDA8261_STEP_125 /* 125 kHz */
  14. };
  15. struct tda8261_config {
  16. // u8 buf[16];
  17. u8 addr;
  18. enum tda8261_step step_size;
  19. };
  20. #if IS_REACHABLE(CONFIG_DVB_TDA8261)
  21. extern struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe,
  22. const struct tda8261_config *config,
  23. struct i2c_adapter *i2c);
  24. #else
  25. static inline struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe,
  26. const struct tda8261_config *config,
  27. struct i2c_adapter *i2c)
  28. {
  29. printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
  30. return NULL;
  31. }
  32. #endif //CONFIG_DVB_TDA8261
  33. #endif// __TDA8261_H