max2165.h 773 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Driver for Maxim MAX2165 silicon tuner
  4. *
  5. * Copyright (c) 2009 David T. L. Wong <davidtlwong@gmail.com>
  6. */
  7. #ifndef __MAX2165_H__
  8. #define __MAX2165_H__
  9. struct dvb_frontend;
  10. struct i2c_adapter;
  11. struct max2165_config {
  12. u8 i2c_address;
  13. u8 osc_clk; /* in MHz, selectable values: 4,16,18,20,22,24,26,28 */
  14. };
  15. #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MAX2165)
  16. extern struct dvb_frontend *max2165_attach(struct dvb_frontend *fe,
  17. struct i2c_adapter *i2c,
  18. struct max2165_config *cfg);
  19. #else
  20. static inline struct dvb_frontend *max2165_attach(struct dvb_frontend *fe,
  21. struct i2c_adapter *i2c,
  22. struct max2165_config *cfg)
  23. {
  24. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  25. return NULL;
  26. }
  27. #endif
  28. #endif