diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2018-06-23 18:36:11 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-30 23:23:12 +0300 |
commit | e552684809d601c9a6109a73322c816ce1de10bd (patch) | |
tree | c74a7657e8108d5593e8460ca625833efc637d34 /drivers/media/pci/ddbridge/ddbridge-mci.h | |
parent | 84409a95bbae75c5396c6db9ac43f1d1626d6b75 (diff) | |
download | linux-e552684809d601c9a6109a73322c816ce1de10bd.tar.xz |
media: ddbridge/mci: split MaxSX8 specific code off to ddbridge-sx8.c
Split off all code specific to the MaxSX8 cards to a separate ddbridge-sx8
module and hook it up in the Makefile. This also adds evaluation of the
mci_type to allow for using different attach handling for different cards.
As different cards can implement things differently (ie. support differing
frontend_ops, and have different base structs being put ontop of the
common mci_base struct), this introduces the mci_cfg struct which is
initially used to hold a few specifics to the -sx8 submodule. While at it,
the handling of the i/q mode is adjusted slightly. Besides this and
handling mci_base and sx8_base struct pointers where needed, all code
is copied unmodified from ddbridge-mci.c.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/ddbridge/ddbridge-mci.h')
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-mci.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-mci.h b/drivers/media/pci/ddbridge/ddbridge-mci.h index 14c8b1ee6358..f02bc76e3c98 100644 --- a/drivers/media/pci/ddbridge/ddbridge-mci.h +++ b/drivers/media/pci/ddbridge/ddbridge-mci.h @@ -211,18 +211,11 @@ struct mci_base { void *key; struct ddb_link *link; struct completion completion; - struct device *dev; struct mutex tuner_lock; /* concurrent tuner access lock */ - u8 adr; struct mutex mci_lock; /* concurrent MCI access lock */ int count; - - u8 tuner_use_count[MCI_TUNER_MAX]; - u8 assigned_demod[MCI_DEMOD_MAX]; - u32 used_ldpc_bitrate[MCI_DEMOD_MAX]; - u8 demod_in_use[MCI_DEMOD_MAX]; - u32 iq_mode; + int type; }; struct mci { @@ -231,20 +224,27 @@ struct mci { int nr; int demod; int tuner; - int first_time_lock; - int started; - struct mci_result signal_info; +}; - u32 bb_mode; +struct mci_cfg { + int type; + struct dvb_frontend_ops *fe_ops; + u32 base_size; + u32 state_size; + int (*init)(struct mci *mci); + int (*base_init)(struct mci_base *mci_base); + int (*set_input)(struct dvb_frontend *fe, int input); }; +/* defined in ddbridge-sx8.c */ +extern const struct mci_cfg ddb_max_sx8_cfg; + int ddb_mci_cmd(struct mci *state, struct mci_command *command, struct mci_result *result); int ddb_mci_config(struct mci *state, u32 config); struct dvb_frontend -*ddb_mci_attach(struct ddb_input *input, - int mci_type, int nr, +*ddb_mci_attach(struct ddb_input *input, struct mci_cfg *cfg, int nr, int (**fn_set_input)(struct dvb_frontend *fe, int input)); #endif /* _DDBRIDGE_MCI_H_ */ |