mb86a20s.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Fujitsu mb86a20s driver
  3. *
  4. * Copyright (C) 2010 Mauro Carvalho Chehab <mchehab@redhat.com>
  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. * @demod_address: the demodulator's i2c address
  22. */
  23. struct mb86a20s_config {
  24. u8 demod_address;
  25. bool is_serial;
  26. };
  27. #if defined(CONFIG_DVB_MB86A20S) || (defined(CONFIG_DVB_MB86A20S_MODULE) \
  28. && defined(MODULE))
  29. extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config,
  30. struct i2c_adapter *i2c);
  31. extern struct i2c_adapter *mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *);
  32. #else
  33. static inline struct dvb_frontend *mb86a20s_attach(
  34. const struct mb86a20s_config *config, struct i2c_adapter *i2c)
  35. {
  36. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  37. return NULL;
  38. }
  39. static struct i2c_adapter *
  40. mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *fe)
  41. {
  42. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  43. return NULL;
  44. }
  45. #endif
  46. #endif /* MB86A20S */