rtl2832.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Realtek RTL2832 DVB-T demodulator driver
  4. *
  5. * Copyright (C) 2012 Thomas Mair <thomas.mair86@gmail.com>
  6. * Copyright (C) 2012-2014 Antti Palosaari <crope@iki.fi>
  7. */
  8. #ifndef RTL2832_H
  9. #define RTL2832_H
  10. #include <linux/dvb/frontend.h>
  11. #include <linux/i2c-mux.h>
  12. /**
  13. * struct rtl2832_platform_data - Platform data for the rtl2832 driver
  14. * @clk: Clock frequency (4000000, 16000000, 25000000, 28800000).
  15. * @tuner: Used tuner model.
  16. * @get_dvb_frontend: Get DVB frontend.
  17. * @get_i2c_adapter: Get I2C adapter.
  18. * @slave_ts_ctrl: Control slave TS interface.
  19. * @pid_filter: Set PID to PID filter.
  20. * @pid_filter_ctrl: Control PID filter.
  21. */
  22. struct rtl2832_platform_data {
  23. u32 clk;
  24. /*
  25. * XXX: This list must be kept sync with dvb_usb_rtl28xxu USB IF driver.
  26. */
  27. #define RTL2832_TUNER_FC2580 0x21
  28. #define RTL2832_TUNER_TUA9001 0x24
  29. #define RTL2832_TUNER_FC0012 0x26
  30. #define RTL2832_TUNER_E4000 0x27
  31. #define RTL2832_TUNER_FC0013 0x29
  32. #define RTL2832_TUNER_R820T 0x2a
  33. #define RTL2832_TUNER_R828D 0x2b
  34. #define RTL2832_TUNER_SI2157 0x2c
  35. u8 tuner;
  36. struct dvb_frontend* (*get_dvb_frontend)(struct i2c_client *);
  37. struct i2c_adapter* (*get_i2c_adapter)(struct i2c_client *);
  38. int (*slave_ts_ctrl)(struct i2c_client *, bool);
  39. int (*pid_filter)(struct dvb_frontend *, u8, u16, int);
  40. int (*pid_filter_ctrl)(struct dvb_frontend *, int);
  41. /* private: Register access for SDR module use only */
  42. struct regmap *regmap;
  43. };
  44. #endif /* RTL2832_H */