xref: /openbmc/linux/drivers/media/tuners/mt2131.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*c942fddfSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2ccae7af2SMauro Carvalho Chehab /*
3ccae7af2SMauro Carvalho Chehab  *  Driver for Microtune MT2131 "QAM/8VSB single chip tuner"
4ccae7af2SMauro Carvalho Chehab  *
5ccae7af2SMauro Carvalho Chehab  *  Copyright (c) 2006 Steven Toth <stoth@linuxtv.org>
6ccae7af2SMauro Carvalho Chehab  */
7ccae7af2SMauro Carvalho Chehab 
8ccae7af2SMauro Carvalho Chehab #ifndef __MT2131_H__
9ccae7af2SMauro Carvalho Chehab #define __MT2131_H__
10ccae7af2SMauro Carvalho Chehab 
11ccae7af2SMauro Carvalho Chehab struct dvb_frontend;
12ccae7af2SMauro Carvalho Chehab struct i2c_adapter;
13ccae7af2SMauro Carvalho Chehab 
14ccae7af2SMauro Carvalho Chehab struct mt2131_config {
15ccae7af2SMauro Carvalho Chehab 	u8 i2c_address;
16ccae7af2SMauro Carvalho Chehab 	u8 clock_out; /* 0 = off, 1 = CLK/4, 2 = CLK/2, 3 = CLK/1 */
17ccae7af2SMauro Carvalho Chehab };
18ccae7af2SMauro Carvalho Chehab 
199b174527SArnd Bergmann #if IS_REACHABLE(CONFIG_MEDIA_TUNER_MT2131)
20ccae7af2SMauro Carvalho Chehab extern struct dvb_frontend* mt2131_attach(struct dvb_frontend *fe,
21ccae7af2SMauro Carvalho Chehab 					  struct i2c_adapter *i2c,
22ccae7af2SMauro Carvalho Chehab 					  struct mt2131_config *cfg,
23ccae7af2SMauro Carvalho Chehab 					  u16 if1);
24ccae7af2SMauro Carvalho Chehab #else
mt2131_attach(struct dvb_frontend * fe,struct i2c_adapter * i2c,struct mt2131_config * cfg,u16 if1)25ccae7af2SMauro Carvalho Chehab static inline struct dvb_frontend* mt2131_attach(struct dvb_frontend *fe,
26ccae7af2SMauro Carvalho Chehab 						 struct i2c_adapter *i2c,
27ccae7af2SMauro Carvalho Chehab 						 struct mt2131_config *cfg,
28ccae7af2SMauro Carvalho Chehab 						 u16 if1)
29ccae7af2SMauro Carvalho Chehab {
30ccae7af2SMauro Carvalho Chehab 	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
31ccae7af2SMauro Carvalho Chehab 	return NULL;
32ccae7af2SMauro Carvalho Chehab }
33ccae7af2SMauro Carvalho Chehab #endif /* CONFIG_MEDIA_TUNER_MT2131 */
34ccae7af2SMauro Carvalho Chehab 
35ccae7af2SMauro Carvalho Chehab #endif /* __MT2131_H__ */
36