ascot2e.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * ascot2e.h
  3. *
  4. * Sony Ascot3E DVB-T/T2/C/C2 tuner driver
  5. *
  6. * Copyright 2012 Sony Corporation
  7. * Copyright (C) 2014 NetUP Inc.
  8. * Copyright (C) 2014 Sergey Kozlov <serjk@netup.ru>
  9. * Copyright (C) 2014 Abylay Ospan <aospan@netup.ru>
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. */
  21. #ifndef __DVB_ASCOT2E_H__
  22. #define __DVB_ASCOT2E_H__
  23. #include <linux/kconfig.h>
  24. #include <linux/dvb/frontend.h>
  25. #include <linux/i2c.h>
  26. /**
  27. * struct ascot2e_config - the configuration of Ascot2E tuner driver
  28. * @i2c_address: I2C address of the tuner
  29. * @xtal_freq_mhz: Oscillator frequency, MHz
  30. * @set_tuner_priv: Callback function private context
  31. * @set_tuner_callback: Callback function that notifies the parent driver
  32. * which tuner is active now
  33. */
  34. struct ascot2e_config {
  35. u8 i2c_address;
  36. u8 xtal_freq_mhz;
  37. void *set_tuner_priv;
  38. int (*set_tuner_callback)(void *, int);
  39. };
  40. #if IS_REACHABLE(CONFIG_DVB_ASCOT2E)
  41. extern struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe,
  42. const struct ascot2e_config *config,
  43. struct i2c_adapter *i2c);
  44. #else
  45. static inline struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe,
  46. const struct ascot2e_config *config,
  47. struct i2c_adapter *i2c)
  48. {
  49. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  50. return NULL;
  51. }
  52. #endif
  53. #endif