^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * mxl111sf-demod.h - driver for the MaxLinear MXL111SF DVB-T demodulator
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Copyright (C) 2010-2014 Michael Krufky <mkrufky@linuxtv.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #ifndef __MXL111SF_DEMOD_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #define __MXL111SF_DEMOD_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <media/dvb_frontend.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include "mxl111sf.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) struct mxl111sf_demod_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) int (*read_reg)(struct mxl111sf_state *state, u8 addr, u8 *data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int (*write_reg)(struct mxl111sf_state *state, u8 addr, u8 data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) int (*program_regs)(struct mxl111sf_state *state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) struct mxl111sf_reg_ctrl_info *ctrl_reg_info);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #if IS_ENABLED(CONFIG_DVB_USB_MXL111SF)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) const struct mxl111sf_demod_config *cfg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) static inline
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct dvb_frontend *mxl111sf_demod_attach(struct mxl111sf_state *mxl_state,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) const struct mxl111sf_demod_config *cfg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #endif /* CONFIG_DVB_USB_MXL111SF */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) #endif /* __MXL111SF_DEMOD_H__ */