sp2.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_H
  8. #define SP2_H
  9. #include <media/dvb_ca_en50221.h>
  10. /*
  11. * I2C address
  12. * 0x40 (port 0)
  13. * 0x41 (port 1)
  14. */
  15. struct sp2_config {
  16. /* dvb_adapter to attach the ci to */
  17. struct dvb_adapter *dvb_adap;
  18. /* function ci_control handles the device specific ci ops */
  19. void *ci_control;
  20. /* priv is passed back to function ci_control */
  21. void *priv;
  22. };
  23. extern int sp2_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
  24. int slot, int addr);
  25. extern int sp2_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
  26. int slot, int addr, u8 data);
  27. extern int sp2_ci_read_cam_control(struct dvb_ca_en50221 *en50221,
  28. int slot, u8 addr);
  29. extern int sp2_ci_write_cam_control(struct dvb_ca_en50221 *en50221,
  30. int slot, u8 addr, u8 data);
  31. extern int sp2_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot);
  32. extern int sp2_ci_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot);
  33. extern int sp2_ci_slot_ts_enable(struct dvb_ca_en50221 *en50221, int slot);
  34. extern int sp2_ci_poll_slot_status(struct dvb_ca_en50221 *en50221,
  35. int slot, int open);
  36. #endif