Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * CIMaX SP2/HF CI driver
0004  *
0005  * Copyright (C) 2014 Olli Salonen <olli.salonen@iki.fi>
0006  */
0007 
0008 #ifndef SP2_H
0009 #define SP2_H
0010 
0011 #include <media/dvb_ca_en50221.h>
0012 
0013 /*
0014  * I2C address
0015  * 0x40 (port 0)
0016  * 0x41 (port 1)
0017  */
0018 struct sp2_config {
0019     /* dvb_adapter to attach the ci to */
0020     struct dvb_adapter *dvb_adap;
0021 
0022     /* function ci_control handles the device specific ci ops */
0023     void *ci_control;
0024 
0025     /* priv is passed back to function ci_control */
0026     void *priv;
0027 };
0028 
0029 extern int sp2_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221,
0030                     int slot, int addr);
0031 extern int sp2_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221,
0032                     int slot, int addr, u8 data);
0033 extern int sp2_ci_read_cam_control(struct dvb_ca_en50221 *en50221,
0034                     int slot, u8 addr);
0035 extern int sp2_ci_write_cam_control(struct dvb_ca_en50221 *en50221,
0036                     int slot, u8 addr, u8 data);
0037 extern int sp2_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot);
0038 extern int sp2_ci_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot);
0039 extern int sp2_ci_slot_ts_enable(struct dvb_ca_en50221 *en50221, int slot);
0040 extern int sp2_ci_poll_slot_status(struct dvb_ca_en50221 *en50221,
0041                     int slot, int open);
0042 
0043 #endif