mantis_link.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. Mantis PCI bridge driver
  3. Copyright (C) 2005, 2006 Manu Abraham (abraham.manu@gmail.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 __MANTIS_LINK_H
  17. #define __MANTIS_LINK_H
  18. #include <linux/workqueue.h>
  19. enum mantis_sbuf_status {
  20. MANTIS_SBUF_DATA_AVAIL = 1,
  21. MANTIS_SBUF_DATA_EMPTY = 2,
  22. MANTIS_SBUF_DATA_OVFLW = 3
  23. };
  24. struct mantis_slot {
  25. u32 timeout;
  26. };
  27. /* Physical layer */
  28. enum mantis_slot_state {
  29. MODULE_INSERTED = 3,
  30. MODULE_XTRACTED = 4
  31. };
  32. struct mantis_ca {
  33. struct mantis_slot slot;
  34. struct work_struct hif_evm_work;
  35. u32 hif_event;
  36. wait_queue_head_t hif_opdone_wq;
  37. wait_queue_head_t hif_brrdyw_wq;
  38. wait_queue_head_t hif_data_wq;
  39. u32 hif_job_queue;
  40. enum mantis_sbuf_status sbuf_status;
  41. enum mantis_slot_state slot_state;
  42. struct dvb_device *ca_dev;
  43. void *ca_priv;
  44. };
  45. /* CA */
  46. extern void mantis_event_cam_plugin(struct mantis_ca *ca);
  47. extern void mantis_event_cam_unplug(struct mantis_ca *ca);
  48. extern int mantis_pcmcia_init(struct mantis_ca *ca);
  49. extern void mantis_pcmcia_exit(struct mantis_ca *ca);
  50. extern int mantis_evmgr_init(struct mantis_ca *ca);
  51. extern void mantis_evmgr_exit(struct mantis_ca *ca);
  52. #endif // __MANTIS_LINK_H