tda10048.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. NXP TDA10048HN DVB OFDM demodulator driver
  3. Copyright (C) 2009 Steven Toth <stoth@kernellabs.com>
  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. #define TDA10048_IF_3300 3300
  35. #define TDA10048_IF_3500 3500
  36. #define TDA10048_IF_3800 3800
  37. #define TDA10048_IF_4000 4000
  38. #define TDA10048_IF_4300 4300
  39. #define TDA10048_IF_4500 4500
  40. #define TDA10048_IF_4750 4750
  41. #define TDA10048_IF_36130 36130
  42. u16 dtv6_if_freq_khz;
  43. u16 dtv7_if_freq_khz;
  44. u16 dtv8_if_freq_khz;
  45. #define TDA10048_CLK_4000 4000
  46. #define TDA10048_CLK_16000 16000
  47. u16 clk_freq_khz;
  48. /* Disable I2C gate access */
  49. u8 disable_gate_access;
  50. };
  51. #if defined(CONFIG_DVB_TDA10048) || \
  52. (defined(CONFIG_DVB_TDA10048_MODULE) && defined(MODULE))
  53. extern struct dvb_frontend *tda10048_attach(
  54. const struct tda10048_config *config,
  55. struct i2c_adapter *i2c);
  56. #else
  57. static inline struct dvb_frontend *tda10048_attach(
  58. const struct tda10048_config *config,
  59. struct i2c_adapter *i2c)
  60. {
  61. printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
  62. return NULL;
  63. }
  64. #endif /* CONFIG_DVB_TDA10048 */
  65. #endif /* TDA10048_H */