sp2_priv.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * CIMaX SP2/HF CI driver
  3. *
  4. * Copyright (C) 2014 Olli Salonen <olli.salonen@iki.fi>
  5. *
  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. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #ifndef SP2_PRIV_H
  17. #define SP2_PRIV_H
  18. #include "sp2.h"
  19. #include "dvb_frontend.h"
  20. /* state struct */
  21. struct sp2 {
  22. int status;
  23. struct i2c_client *client;
  24. struct dvb_adapter *dvb_adap;
  25. struct dvb_ca_en50221 ca;
  26. int module_access_type;
  27. unsigned long next_status_checked_time;
  28. void *priv;
  29. void *ci_control;
  30. };
  31. #define SP2_CI_ATTR_ACS 0x00
  32. #define SP2_CI_IO_ACS 0x04
  33. #define SP2_CI_WR 0
  34. #define SP2_CI_RD 1
  35. /* Module control register (0x00 module A, 0x09 module B) bits */
  36. #define SP2_MOD_CTL_DET 0x01
  37. #define SP2_MOD_CTL_AUTO 0x02
  38. #define SP2_MOD_CTL_ACS0 0x04
  39. #define SP2_MOD_CTL_ACS1 0x08
  40. #define SP2_MOD_CTL_HAD 0x10
  41. #define SP2_MOD_CTL_TSIEN 0x20
  42. #define SP2_MOD_CTL_TSOEN 0x40
  43. #define SP2_MOD_CTL_RST 0x80
  44. #endif