au8522_priv.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. Auvitek AU8522 QAM/8VSB demodulator driver
  3. Copyright (C) 2008 Steven Toth <stoth@linuxtv.org>
  4. Copyright (C) 2008 Devin Heitmueller <dheitmueller@linuxtv.org>
  5. Copyright (C) 2005-2008 Auvitek International, Ltd.
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. #include <linux/kernel.h>
  19. #include <linux/init.h>
  20. #include <linux/module.h>
  21. #include <linux/string.h>
  22. #include <linux/slab.h>
  23. #include <linux/delay.h>
  24. #include <linux/videodev2.h>
  25. #include <media/v4l2-device.h>
  26. #include <linux/i2c.h>
  27. #include "dvb_frontend.h"
  28. #include "au8522.h"
  29. #include "tuner-i2c.h"
  30. struct au8522_state {
  31. struct i2c_adapter *i2c;
  32. /* configuration settings */
  33. const struct au8522_config *config;
  34. struct dvb_frontend frontend;
  35. u32 current_frequency;
  36. fe_modulation_t current_modulation;
  37. u32 fe_status;
  38. unsigned int led_state;
  39. };
  40. /* These are routines shared by both the VSB/QAM demodulator and the analog
  41. decoder */
  42. int au8522_writereg(struct au8522_state *state, u16 reg, u8 data);
  43. u8 au8522_readreg(struct au8522_state *state, u16 reg);
  44. int au8522_init(struct dvb_frontend *fe);
  45. int au8522_sleep(struct dvb_frontend *fe);