mb86a20s.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Fujitsu mb86a20s driver
  3. *
  4. * Copyright (C) 2010 Mauro Carvalho Chehab
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation version 2.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. */
  15. #ifndef MB86A20S_H
  16. #define MB86A20S_H
  17. #include <linux/dvb/frontend.h>
  18. /**
  19. * struct mb86a20s_config - Define the per-device attributes of the frontend
  20. *
  21. * @fclk: Clock frequency. If zero, assumes the default
  22. * (32.57142 Mhz)
  23. * @demod_address: the demodulator's i2c address
  24. * @is_serial: if true, TS is serial. Otherwise, TS is parallel
  25. */
  26. struct mb86a20s_config {
  27. u32 fclk;
  28. u8 demod_address;
  29. bool is_serial;
  30. };
  31. #if IS_REACHABLE(CONFIG_DVB_MB86A20S)
  32. extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
  33. struct i2c_adapter *i2c);
  34. extern struct i2c_adapter *mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *);
  35. #else
  36. static inline struct dvb_frontend *mb86a20s_attach(
  37. const struct mb86a20s_config *config, struct i2c_adapter *i2c)
  38. {
  39. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  40. return NULL;
  41. }
  42. static inline struct i2c_adapter *
  43. mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *fe)
  44. {
  45. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  46. return NULL;
  47. }
  48. #endif
  49. #endif /* MB86A20S */