drm/dp_mst: Add helper to get port number at specific LCT from RAD
[drm/drm-misc.git] / drivers / media / tuners / tda827x.h
blobd3c2f00ada8f4e6c381e908e37b9c48f3332e806
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 DVB Driver for Philips tda827x / tda827xa Silicon tuners
5 (c) 2005 Hartmut Hackmann
6 (c) 2007 Michael Krufky
9 */
11 #ifndef __DVB_TDA827X_H__
12 #define __DVB_TDA827X_H__
14 #include <linux/i2c.h>
15 #include <media/dvb_frontend.h>
16 #include "tda8290.h"
18 struct tda827x_config
20 /* saa7134 - provided callbacks */
21 int (*init) (struct dvb_frontend *fe);
22 int (*sleep) (struct dvb_frontend *fe);
24 /* interface to tda829x driver */
25 enum tda8290_lna config;
26 int switch_addr;
28 void (*agcf)(struct dvb_frontend *fe);
32 /**
33 * tda827x_attach() - Attach a tda827x tuner to the supplied frontend structure
35 * @fe: Frontend to attach to.
36 * @addr: i2c address of the tuner.
37 * @i2c: i2c adapter to use.
38 * @cfg: optional callback function pointers.
39 * @return FE pointer on success, NULL on failure.
41 #if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA827X)
42 extern struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, int addr,
43 struct i2c_adapter *i2c,
44 struct tda827x_config *cfg);
45 #else
46 static inline struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe,
47 int addr,
48 struct i2c_adapter *i2c,
49 struct tda827x_config *cfg)
51 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
52 return NULL;
54 #endif // CONFIG_MEDIA_TUNER_TDA827X
56 #endif // __DVB_TDA827X_H__