atbm8830.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Support for AltoBeam GB20600 (a.k.a DMB-TH) demodulator
  4. * ATBM8830, ATBM8831
  5. *
  6. * Copyright (C) 2009 David T.L. Wong <davidtlwong@gmail.com>
  7. */
  8. #ifndef __ATBM8830_H__
  9. #define __ATBM8830_H__
  10. #include <linux/dvb/frontend.h>
  11. #include <linux/i2c.h>
  12. #define ATBM8830_PROD_8830 0
  13. #define ATBM8830_PROD_8831 1
  14. struct atbm8830_config {
  15. /* product type */
  16. u8 prod;
  17. /* the demodulator's i2c address */
  18. u8 demod_address;
  19. /* parallel or serial transport stream */
  20. u8 serial_ts;
  21. /* transport stream clock output only when receiving valid stream */
  22. u8 ts_clk_gated;
  23. /* Decoder sample TS data at rising edge of clock */
  24. u8 ts_sampling_edge;
  25. /* Oscillator clock frequency */
  26. u32 osc_clk_freq; /* in kHz */
  27. /* IF frequency */
  28. u32 if_freq; /* in kHz */
  29. /* Swap I/Q for zero IF */
  30. u8 zif_swap_iq;
  31. /* Tuner AGC settings */
  32. u8 agc_min;
  33. u8 agc_max;
  34. u8 agc_hold_loop;
  35. };
  36. #if IS_REACHABLE(CONFIG_DVB_ATBM8830)
  37. extern struct dvb_frontend *atbm8830_attach(const struct atbm8830_config *config,
  38. struct i2c_adapter *i2c);
  39. #else
  40. static inline
  41. struct dvb_frontend *atbm8830_attach(const struct atbm8830_config *config,
  42. struct i2c_adapter *i2c) {
  43. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  44. return NULL;
  45. }
  46. #endif /* CONFIG_DVB_ATBM8830 */
  47. #endif /* __ATBM8830_H__ */