fc0012.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Fitipower FC0012 tuner driver - include
  3. *
  4. * Copyright (C) 2012 Hans-Frieder Vogt <hfvogt@gmx.net>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #ifndef _FC0012_H_
  17. #define _FC0012_H_
  18. #include <media/dvb_frontend.h>
  19. #include "fc001x-common.h"
  20. struct fc0012_config {
  21. /*
  22. * I2C address
  23. */
  24. u8 i2c_address;
  25. /*
  26. * clock
  27. */
  28. enum fc001x_xtal_freq xtal_freq;
  29. bool dual_master;
  30. /*
  31. * RF loop-through
  32. */
  33. bool loop_through;
  34. /*
  35. * clock output
  36. */
  37. bool clock_out;
  38. };
  39. #if IS_REACHABLE(CONFIG_MEDIA_TUNER_FC0012)
  40. extern struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
  41. struct i2c_adapter *i2c,
  42. const struct fc0012_config *cfg);
  43. #else
  44. static inline struct dvb_frontend *fc0012_attach(struct dvb_frontend *fe,
  45. struct i2c_adapter *i2c,
  46. const struct fc0012_config *cfg)
  47. {
  48. pr_warn("%s: driver disabled by Kconfig\n", __func__);
  49. return NULL;
  50. }
  51. #endif
  52. #endif