sp887x.h 799 B

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