tda10048.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. NXP TDA10048HN DVB OFDM demodulator driver
  4. Copyright (C) 2009 Steven Toth <stoth@kernellabs.com>
  5. */
  6. #ifndef TDA10048_H
  7. #define TDA10048_H
  8. #include <linux/dvb/frontend.h>
  9. #include <linux/firmware.h>
  10. struct tda10048_config {
  11. /* the demodulator's i2c address */
  12. u8 demod_address;
  13. /* serial/parallel output */
  14. #define TDA10048_PARALLEL_OUTPUT 0
  15. #define TDA10048_SERIAL_OUTPUT 1
  16. u8 output_mode;
  17. #define TDA10048_BULKWRITE_200 200
  18. #define TDA10048_BULKWRITE_50 50
  19. u8 fwbulkwritelen;
  20. /* Spectral Inversion */
  21. #define TDA10048_INVERSION_OFF 0
  22. #define TDA10048_INVERSION_ON 1
  23. u8 inversion;
  24. #define TDA10048_IF_3300 3300
  25. #define TDA10048_IF_3500 3500
  26. #define TDA10048_IF_3800 3800
  27. #define TDA10048_IF_4000 4000
  28. #define TDA10048_IF_4300 4300
  29. #define TDA10048_IF_4500 4500
  30. #define TDA10048_IF_4750 4750
  31. #define TDA10048_IF_5000 5000
  32. #define TDA10048_IF_36130 36130
  33. u16 dtv6_if_freq_khz;
  34. u16 dtv7_if_freq_khz;
  35. u16 dtv8_if_freq_khz;
  36. #define TDA10048_CLK_4000 4000
  37. #define TDA10048_CLK_16000 16000
  38. u16 clk_freq_khz;
  39. /* Disable I2C gate access */
  40. u8 disable_gate_access;
  41. bool no_firmware;
  42. bool set_pll;
  43. u8 pll_m;
  44. u8 pll_p;
  45. u8 pll_n;
  46. };
  47. #if IS_REACHABLE(CONFIG_DVB_TDA10048)
  48. extern struct dvb_frontend *tda10048_attach(
  49. const struct tda10048_config *config,
  50. struct i2c_adapter *i2c);
  51. #else
  52. static inline struct dvb_frontend *tda10048_attach(
  53. const struct tda10048_config *config,
  54. struct i2c_adapter *i2c)
  55. {
  56. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  57. return NULL;
  58. }
  59. #endif /* CONFIG_DVB_TDA10048 */
  60. #endif /* TDA10048_H */