sp887x.h 760 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. Driver for the Spase sp887x demodulator
  3. */
  4. #ifndef SP887X_H
  5. #define SP887X_H
  6. #include <linux/dvb/frontend.h>
  7. #include <linux/firmware.h>
  8. struct sp887x_config
  9. {
  10. /* the demodulator's i2c address */
  11. u8 demod_address;
  12. /* request firmware for device */
  13. int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name);
  14. };
  15. #if IS_REACHABLE(CONFIG_DVB_SP887X)
  16. extern struct dvb_frontend* sp887x_attach(const struct sp887x_config* config,
  17. struct i2c_adapter* i2c);
  18. #else
  19. static inline struct dvb_frontend* sp887x_attach(const struct sp887x_config* config,
  20. struct i2c_adapter* i2c)
  21. {
  22. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  23. return NULL;
  24. }
  25. #endif // CONFIG_DVB_SP887X
  26. #endif // SP887X_H