sp2_priv.h 881 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * CIMaX SP2/HF CI driver
  4. *
  5. * Copyright (C) 2014 Olli Salonen <olli.salonen@iki.fi>
  6. */
  7. #ifndef SP2_PRIV_H
  8. #define SP2_PRIV_H
  9. #include "sp2.h"
  10. #include <media/dvb_frontend.h>
  11. /* state struct */
  12. struct sp2 {
  13. int status;
  14. struct i2c_client *client;
  15. struct dvb_adapter *dvb_adap;
  16. struct dvb_ca_en50221 ca;
  17. int module_access_type;
  18. unsigned long next_status_checked_time;
  19. void *priv;
  20. void *ci_control;
  21. };
  22. #define SP2_CI_ATTR_ACS 0x00
  23. #define SP2_CI_IO_ACS 0x04
  24. #define SP2_CI_WR 0
  25. #define SP2_CI_RD 1
  26. /* Module control register (0x00 module A, 0x09 module B) bits */
  27. #define SP2_MOD_CTL_DET 0x01
  28. #define SP2_MOD_CTL_AUTO 0x02
  29. #define SP2_MOD_CTL_ACS0 0x04
  30. #define SP2_MOD_CTL_ACS1 0x08
  31. #define SP2_MOD_CTL_HAD 0x10
  32. #define SP2_MOD_CTL_TSIEN 0x20
  33. #define SP2_MOD_CTL_TSOEN 0x40
  34. #define SP2_MOD_CTL_RST 0x80
  35. #endif