From f894165cb57922361a8cbe339e29b8c78ad4036a Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Sun, 25 Jun 2017 18:37:07 -0300 Subject: media: dvb_ca_en50221: Add block read/write functions Some lower level drivers may work better when sending blocks of data instead byte per byte. For this we need new function pointers in the dvb_ca_en50221 protocol structure (read_data, write_data) and the protocol needs to execute them, if they are defined. Block data transmission is done in all states except LINKINIT. Original code change by Ralph Metzler, modified by Jasmin Jessich and Daniel Scheller to match Kernel code style. Signed-off-by: Ralph Metzler Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_ca_en50221.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/media/dvb-core/dvb_ca_en50221.h') diff --git a/drivers/media/dvb-core/dvb_ca_en50221.h b/drivers/media/dvb-core/dvb_ca_en50221.h index 1e4bbbd34d91..82617bac0875 100644 --- a/drivers/media/dvb-core/dvb_ca_en50221.h +++ b/drivers/media/dvb-core/dvb_ca_en50221.h @@ -41,6 +41,8 @@ * @write_attribute_mem: function for writing attribute memory on the CAM * @read_cam_control: function for reading the control interface on the CAM * @write_cam_control: function for reading the control interface on the CAM + * @read_data: function for reading data (block mode) + * @write_data: function for writing data (block mode) * @slot_reset: function to reset the CAM slot * @slot_shutdown: function to shutdown a CAM slot * @slot_ts_enable: function to enable the Transport Stream on a CAM slot @@ -66,6 +68,11 @@ struct dvb_ca_en50221 { int (*write_cam_control)(struct dvb_ca_en50221 *ca, int slot, u8 address, u8 value); + int (*read_data)(struct dvb_ca_en50221 *ca, + int slot, u8 *ebuf, int ecount); + int (*write_data)(struct dvb_ca_en50221 *ca, + int slot, u8 *ebuf, int ecount); + int (*slot_reset)(struct dvb_ca_en50221 *ca, int slot); int (*slot_shutdown)(struct dvb_ca_en50221 *ca, int slot); int (*slot_ts_enable)(struct dvb_ca_en50221 *ca, int slot); -- cgit v1.2.1