tda10048.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. NXP TDA10048HN DVB OFDM demodulator driver
  3. Copyright (C) 2008 Steven Toth <stoth@linuxtv.org>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef TDA10048_H
  17. #define TDA10048_H
  18. #include <linux/dvb/frontend.h>
  19. #include <linux/firmware.h>
  20. struct tda10048_config {
  21. /* the demodulator's i2c address */
  22. u8 demod_address;
  23. /* serial/parallel output */
  24. #define TDA10048_PARALLEL_OUTPUT 0
  25. #define TDA10048_SERIAL_OUTPUT 1
  26. u8 output_mode;
  27. #define TDA10048_BULKWRITE_200 200
  28. #define TDA10048_BULKWRITE_50 50
  29. u8 fwbulkwritelen;
  30. /* Spectral Inversion */
  31. #define TDA10048_INVERSION_OFF 0
  32. #define TDA10048_INVERSION_ON 1
  33. u8 inversion;
  34. };
  35. #if defined(CONFIG_DVB_TDA10048) || \
  36. (defined(CONFIG_DVB_TDA10048_MODULE) && defined(MODULE))
  37. extern struct dvb_frontend *tda10048_attach(
  38. const struct tda10048_config *config,
  39. struct i2c_adapter *i2c);
  40. #else
  41. static inline struct dvb_frontend *tda10048_attach(
  42. const struct tda10048_config *config,
  43. struct i2c_adapter *i2c)
  44. {
  45. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  46. return NULL;
  47. }
  48. #endif /* CONFIG_DVB_TDA10048 */
  49. #endif /* TDA10048_H */