fc0011.h 973 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef LINUX_FC0011_H_
  3. #define LINUX_FC0011_H_
  4. #include <media/dvb_frontend.h>
  5. /** struct fc0011_config - fc0011 hardware config
  6. *
  7. * @i2c_address: I2C bus address.
  8. */
  9. struct fc0011_config {
  10. u8 i2c_address;
  11. };
  12. /** enum fc0011_fe_callback_commands - Frontend callbacks
  13. *
  14. * @FC0011_FE_CALLBACK_POWER: Power on tuner hardware.
  15. * @FC0011_FE_CALLBACK_RESET: Request a tuner reset.
  16. */
  17. enum fc0011_fe_callback_commands {
  18. FC0011_FE_CALLBACK_POWER,
  19. FC0011_FE_CALLBACK_RESET,
  20. };
  21. #if IS_REACHABLE(CONFIG_MEDIA_TUNER_FC0011)
  22. struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe,
  23. struct i2c_adapter *i2c,
  24. const struct fc0011_config *config);
  25. #else
  26. static inline
  27. struct dvb_frontend *fc0011_attach(struct dvb_frontend *fe,
  28. struct i2c_adapter *i2c,
  29. const struct fc0011_config *config)
  30. {
  31. dev_err(&i2c->dev, "fc0011 driver disabled in Kconfig\n");
  32. return NULL;
  33. }
  34. #endif
  35. #endif /* LINUX_FC0011_H_ */