or51211.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Support for OR51211 (pcHDTV HD-2000) - VSB
  4. *
  5. * Copyright (C) 2005 Kirk Lapray <kirk_lapray@bigfoot.com>
  6. */
  7. #ifndef OR51211_H
  8. #define OR51211_H
  9. #include <linux/dvb/frontend.h>
  10. #include <linux/firmware.h>
  11. struct or51211_config
  12. {
  13. /* The demodulator's i2c address */
  14. u8 demod_address;
  15. /* Request firmware for device */
  16. int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
  17. void (*setmode)(struct dvb_frontend * fe, int mode);
  18. void (*reset)(struct dvb_frontend * fe);
  19. void (*sleep)(struct dvb_frontend * fe);
  20. };
  21. #if IS_REACHABLE(CONFIG_DVB_OR51211)
  22. extern struct dvb_frontend* or51211_attach(const struct or51211_config* config,
  23. struct i2c_adapter* i2c);
  24. #else
  25. static inline struct dvb_frontend* or51211_attach(const struct or51211_config* config,
  26. struct i2c_adapter* i2c)
  27. {
  28. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  29. return NULL;
  30. }
  31. #endif // CONFIG_DVB_OR51211
  32. #endif // OR51211_H