nxt200x.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Support for NXT2002 and NXT2004 - VSB/QAM
  4. *
  5. * Copyright (C) 2005 Kirk Lapray ([email protected])
  6. * based on nxt2002 by Taylor Jacob <[email protected]>
  7. * and nxt2004 by Jean-Francois Thibert ([email protected])
  8. */
  9. #ifndef NXT200X_H
  10. #define NXT200X_H
  11. #include <linux/dvb/frontend.h>
  12. #include <linux/firmware.h>
  13. typedef enum nxt_chip_t {
  14. NXTUNDEFINED,
  15. NXT2002,
  16. NXT2004
  17. }nxt_chip_type;
  18. struct nxt200x_config
  19. {
  20. /* the demodulator's i2c address */
  21. u8 demod_address;
  22. /* need to set device param for start_dma */
  23. int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);
  24. };
  25. #if IS_REACHABLE(CONFIG_DVB_NXT200X)
  26. extern struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
  27. struct i2c_adapter* i2c);
  28. #else
  29. static inline struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
  30. struct i2c_adapter* i2c)
  31. {
  32. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  33. return NULL;
  34. }
  35. #endif // CONFIG_DVB_NXT200X
  36. #endif /* NXT200X_H */