cx24120.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Conexant CX24120/CX24118 - DVB-S/S2 demod/tuner driver
  4. *
  5. * Copyright (C) 2008 Patrick Boettcher <pb@linuxtv.org>
  6. * Copyright (C) 2009 Sergey Tyurin <forum.free-x.de>
  7. * Updated 2012 by Jannis Achstetter <jannis_achstetter@web.de>
  8. * Copyright (C) 2015 Jemma Denson <jdenson@gmail.com>
  9. */
  10. #ifndef CX24120_H
  11. #define CX24120_H
  12. #include <linux/dvb/frontend.h>
  13. #include <linux/firmware.h>
  14. struct cx24120_initial_mpeg_config {
  15. u8 x1;
  16. u8 x2;
  17. u8 x3;
  18. };
  19. struct cx24120_config {
  20. u8 i2c_addr;
  21. u32 xtal_khz;
  22. struct cx24120_initial_mpeg_config initial_mpeg_config;
  23. int (*request_firmware)(struct dvb_frontend *fe,
  24. const struct firmware **fw, char *name);
  25. /* max bytes I2C provider can write at once */
  26. u16 i2c_wr_max;
  27. };
  28. #if IS_REACHABLE(CONFIG_DVB_CX24120)
  29. struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
  30. struct i2c_adapter *i2c);
  31. #else
  32. static inline
  33. struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
  34. struct i2c_adapter *i2c)
  35. {
  36. pr_warn("%s: driver disabled by Kconfig\n", __func__);
  37. return NULL;
  38. }
  39. #endif
  40. #endif /* CX24120_H */