189ee7f4fSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
29a0bf528SMauro Carvalho Chehab /*
39a0bf528SMauro Carvalho Chehab * drxd.h: DRXD DVB-T demodulator driver
49a0bf528SMauro Carvalho Chehab *
59a0bf528SMauro Carvalho Chehab * Copyright (C) 2005-2007 Micronas
69a0bf528SMauro Carvalho Chehab */
79a0bf528SMauro Carvalho Chehab
89a0bf528SMauro Carvalho Chehab #ifndef _DRXD_H_
99a0bf528SMauro Carvalho Chehab #define _DRXD_H_
109a0bf528SMauro Carvalho Chehab
119a0bf528SMauro Carvalho Chehab #include <linux/types.h>
129a0bf528SMauro Carvalho Chehab #include <linux/i2c.h>
139a0bf528SMauro Carvalho Chehab
149a0bf528SMauro Carvalho Chehab struct drxd_config {
159a0bf528SMauro Carvalho Chehab u8 index;
169a0bf528SMauro Carvalho Chehab
179a0bf528SMauro Carvalho Chehab u8 pll_address;
189a0bf528SMauro Carvalho Chehab u8 pll_type;
199a0bf528SMauro Carvalho Chehab #define DRXD_PLL_NONE 0
209a0bf528SMauro Carvalho Chehab #define DRXD_PLL_DTT7520X 1
219a0bf528SMauro Carvalho Chehab #define DRXD_PLL_MT3X0823 2
229a0bf528SMauro Carvalho Chehab
239a0bf528SMauro Carvalho Chehab u32 clock;
249a0bf528SMauro Carvalho Chehab u8 insert_rs_byte;
259a0bf528SMauro Carvalho Chehab
269a0bf528SMauro Carvalho Chehab u8 demod_address;
279a0bf528SMauro Carvalho Chehab u8 demoda_address;
289a0bf528SMauro Carvalho Chehab u8 demod_revision;
299a0bf528SMauro Carvalho Chehab
309a0bf528SMauro Carvalho Chehab /* If the tuner is not behind an i2c gate, be sure to flip this bit
319a0bf528SMauro Carvalho Chehab or else the i2c bus could get wedged */
329a0bf528SMauro Carvalho Chehab u8 disable_i2c_gate_ctrl;
339a0bf528SMauro Carvalho Chehab
349a0bf528SMauro Carvalho Chehab u32 IF;
359a0bf528SMauro Carvalho Chehab s16(*osc_deviation) (void *priv, s16 dev, int flag);
369a0bf528SMauro Carvalho Chehab };
379a0bf528SMauro Carvalho Chehab
389b174527SArnd Bergmann #if IS_REACHABLE(CONFIG_DVB_DRXD)
399a0bf528SMauro Carvalho Chehab extern
409a0bf528SMauro Carvalho Chehab struct dvb_frontend *drxd_attach(const struct drxd_config *config,
419a0bf528SMauro Carvalho Chehab void *priv, struct i2c_adapter *i2c,
429a0bf528SMauro Carvalho Chehab struct device *dev);
439a0bf528SMauro Carvalho Chehab #else
449a0bf528SMauro Carvalho Chehab static inline
drxd_attach(const struct drxd_config * config,void * priv,struct i2c_adapter * i2c,struct device * dev)459a0bf528SMauro Carvalho Chehab struct dvb_frontend *drxd_attach(const struct drxd_config *config,
469a0bf528SMauro Carvalho Chehab void *priv, struct i2c_adapter *i2c,
479a0bf528SMauro Carvalho Chehab struct device *dev)
489a0bf528SMauro Carvalho Chehab {
499a0bf528SMauro Carvalho Chehab printk(KERN_INFO "%s: not probed - driver disabled by Kconfig\n",
509a0bf528SMauro Carvalho Chehab __func__);
519a0bf528SMauro Carvalho Chehab return NULL;
529a0bf528SMauro Carvalho Chehab }
539a0bf528SMauro Carvalho Chehab #endif
549a0bf528SMauro Carvalho Chehab
559a0bf528SMauro Carvalho Chehab #endif
56