sp2.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_H
  17. #define SP2_H
  18. #include <linux/kconfig.h>
  19. #include "dvb_ca_en50221.h"
  20. /*
  21. * I2C address
  22. * 0x40 (port 0)
  23. * 0x41 (port 1)
  24. */
  25. struct sp2_config {
  26. /* dvb_adapter to attach the ci to */
  27. struct dvb_adapter *dvb_adap;
  28. /* function ci_control handles the device specific ci ops */
  29. void *ci_control;
  30. /* priv is passed back to function ci_control */
  31. void *priv;
  32. };
  33. extern int sp2_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
  34. int slot, int addr);
  35. extern int sp2_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
  36. int slot, int addr, u8 data);
  37. extern int sp2_ci_read_cam_control(struct dvb_ca_en50221 *en50221,
  38. int slot, u8 addr);
  39. extern int sp2_ci_write_cam_control(struct dvb_ca_en50221 *en50221,
  40. int slot, u8 addr, u8 data);
  41. extern int sp2_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot);
  42. extern int sp2_ci_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot);
  43. extern int sp2_ci_slot_ts_enable(struct dvb_ca_en50221 *en50221, int slot);
  44. extern int sp2_ci_poll_slot_status(struct dvb_ca_en50221 *en50221,
  45. int slot, int open);
  46. #endif