Thomas Gleixner | c942fdd | 2019-05-27 08:55:06 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Olli Salonen | 868736a | 2014-08-08 04:06:35 -0300 | [diff] [blame] | 2 | /* |
| 3 | * CIMaX SP2/HF CI driver |
| 4 | * |
| 5 | * Copyright (C) 2014 Olli Salonen <olli.salonen@iki.fi> |
Olli Salonen | 868736a | 2014-08-08 04:06:35 -0300 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef SP2_H |
| 9 | #define SP2_H |
| 10 | |
Mauro Carvalho Chehab | fada193 | 2017-12-28 13:03:51 -0500 | [diff] [blame] | 11 | #include <media/dvb_ca_en50221.h> |
Olli Salonen | 868736a | 2014-08-08 04:06:35 -0300 | [diff] [blame] | 12 | |
| 13 | /* |
| 14 | * I2C address |
| 15 | * 0x40 (port 0) |
| 16 | * 0x41 (port 1) |
| 17 | */ |
| 18 | struct sp2_config { |
| 19 | /* dvb_adapter to attach the ci to */ |
| 20 | struct dvb_adapter *dvb_adap; |
| 21 | |
| 22 | /* function ci_control handles the device specific ci ops */ |
| 23 | void *ci_control; |
| 24 | |
| 25 | /* priv is passed back to function ci_control */ |
| 26 | void *priv; |
| 27 | }; |
| 28 | |
| 29 | extern int sp2_ci_read_attribute_mem(struct dvb_ca_en50221 *en50221, |
| 30 | int slot, int addr); |
| 31 | extern int sp2_ci_write_attribute_mem(struct dvb_ca_en50221 *en50221, |
| 32 | int slot, int addr, u8 data); |
| 33 | extern int sp2_ci_read_cam_control(struct dvb_ca_en50221 *en50221, |
| 34 | int slot, u8 addr); |
| 35 | extern int sp2_ci_write_cam_control(struct dvb_ca_en50221 *en50221, |
| 36 | int slot, u8 addr, u8 data); |
| 37 | extern int sp2_ci_slot_reset(struct dvb_ca_en50221 *en50221, int slot); |
| 38 | extern int sp2_ci_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot); |
| 39 | extern int sp2_ci_slot_ts_enable(struct dvb_ca_en50221 *en50221, int slot); |
| 40 | extern int sp2_ci_poll_slot_status(struct dvb_ca_en50221 *en50221, |
| 41 | int slot, int open); |
| 42 | |
| 43 | #endif |