cxd2841er.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * cxd2841er.h
  3. *
  4. * Sony CXD2441ER digital demodulator driver public definitions
  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 CXD2841ER_H
  22. #define CXD2841ER_H
  23. #include <linux/kconfig.h>
  24. #include <linux/dvb/frontend.h>
  25. struct cxd2841er_config {
  26. u8 i2c_addr;
  27. };
  28. #if IS_REACHABLE(CONFIG_DVB_CXD2841ER)
  29. extern struct dvb_frontend *cxd2841er_attach_s(struct cxd2841er_config *cfg,
  30. struct i2c_adapter *i2c);
  31. extern struct dvb_frontend *cxd2841er_attach_t(struct cxd2841er_config *cfg,
  32. struct i2c_adapter *i2c);
  33. extern struct dvb_frontend *cxd2841er_attach_c(struct cxd2841er_config *cfg,
  34. struct i2c_adapter *i2c);
  35. #else
  36. static inline struct dvb_frontend *cxd2841er_attach_s(
  37. struct cxd2841er_config *cfg,
  38. struct i2c_adapter *i2c)
  39. {
  40. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  41. return NULL;
  42. }
  43. static inline struct dvb_frontend *cxd2841er_attach_t(
  44. struct cxd2841er_config *cfg, struct i2c_adapter *i2c)
  45. {
  46. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  47. return NULL;
  48. }
  49. static inline struct dvb_frontend *cxd2841er_attach_c(
  50. struct cxd2841er_config *cfg, struct i2c_adapter *i2c)
  51. {
  52. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  53. return NULL;
  54. }
  55. #endif
  56. #endif