mb86a20s.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Fujitsu mb86a20s driver
  4. *
  5. * Copyright (C) 2010 Mauro Carvalho Chehab
  6. */
  7. #ifndef MB86A20S_H
  8. #define MB86A20S_H
  9. #include <linux/dvb/frontend.h>
  10. /**
  11. * struct mb86a20s_config - Define the per-device attributes of the frontend
  12. *
  13. * @fclk: Clock frequency. If zero, assumes the default
  14. * (32.57142 Mhz)
  15. * @demod_address: the demodulator's i2c address
  16. * @is_serial: if true, TS is serial. Otherwise, TS is parallel
  17. */
  18. struct mb86a20s_config {
  19. u32 fclk;
  20. u8 demod_address;
  21. bool is_serial;
  22. };
  23. #if IS_REACHABLE(CONFIG_DVB_MB86A20S)
  24. /**
  25. * Attach a mb86a20s demod
  26. *
  27. * @config: pointer to &struct mb86a20s_config with demod configuration.
  28. * @i2c: i2c adapter to use.
  29. *
  30. * return: FE pointer on success, NULL on failure.
  31. */
  32. extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
  33. struct i2c_adapter *i2c);
  34. #else
  35. static inline struct dvb_frontend *mb86a20s_attach(
  36. const struct mb86a20s_config *config, struct i2c_adapter *i2c)
  37. {
  38. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  39. return NULL;
  40. }
  41. #endif
  42. #endif /* MB86A20S */