dvb-pll.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * descriptions + helper functions for simple dvb plls.
  4. */
  5. #ifndef __DVB_PLL_H__
  6. #define __DVB_PLL_H__
  7. #include <linux/i2c.h>
  8. #include <media/dvb_frontend.h>
  9. #define DVB_PLL_UNDEFINED 0
  10. #define DVB_PLL_THOMSON_DTT7579 1
  11. #define DVB_PLL_THOMSON_DTT759X 2
  12. #define DVB_PLL_LG_Z201 3
  13. #define DVB_PLL_UNKNOWN_1 4
  14. #define DVB_PLL_TUA6010XS 5
  15. #define DVB_PLL_ENV57H1XD5 6
  16. #define DVB_PLL_TUA6034 7
  17. #define DVB_PLL_TDA665X 8
  18. #define DVB_PLL_TDED4 9
  19. #define DVB_PLL_TDHU2 10
  20. #define DVB_PLL_SAMSUNG_TBMV 11
  21. #define DVB_PLL_PHILIPS_SD1878_TDA8261 12
  22. #define DVB_PLL_OPERA1 13
  23. #define DVB_PLL_SAMSUNG_DTOS403IH102A 14
  24. #define DVB_PLL_SAMSUNG_TDTC9251DH0 15
  25. #define DVB_PLL_SAMSUNG_TBDU18132 16
  26. #define DVB_PLL_SAMSUNG_TBMU24112 17
  27. #define DVB_PLL_TDEE4 18
  28. #define DVB_PLL_THOMSON_DTT7520X 19
  29. #define DVB_PLL_TUA6034_FRIIO 20
  30. #define DVB_PLL_TDA665X_EARTH_PT1 21
  31. struct dvb_pll_config {
  32. struct dvb_frontend *fe;
  33. };
  34. #if IS_REACHABLE(CONFIG_DVB_PLL)
  35. /**
  36. * Attach a dvb-pll to the supplied frontend structure.
  37. *
  38. * @fe: Frontend to attach to.
  39. * @pll_addr: i2c address of the PLL (if used).
  40. * @i2c: i2c adapter to use (set to NULL if not used).
  41. * @pll_desc_id: dvb_pll_desc to use.
  42. *
  43. * return: Frontend pointer on success, NULL on failure
  44. */
  45. extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
  46. int pll_addr,
  47. struct i2c_adapter *i2c,
  48. unsigned int pll_desc_id);
  49. #else
  50. static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
  51. int pll_addr,
  52. struct i2c_adapter *i2c,
  53. unsigned int pll_desc_id)
  54. {
  55. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  56. return NULL;
  57. }
  58. #endif
  59. #endif