Path: blob/master/drivers/media/common/tuners/tda827x.h
15112 views
/*1DVB Driver for Philips tda827x / tda827xa Silicon tuners23(c) 2005 Hartmut Hackmann4(c) 2007 Michael Krufky56This program is free software; you can redistribute it and/or modify7it under the terms of the GNU General Public License as published by8the Free Software Foundation; either version 2 of the License, or9(at your option) any later version.1011This program is distributed in the hope that it will be useful,12but WITHOUT ANY WARRANTY; without even the implied warranty of13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1415GNU General Public License for more details.1617You should have received a copy of the GNU General Public License18along with this program; if not, write to the Free Software19Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.2021*/2223#ifndef __DVB_TDA827X_H__24#define __DVB_TDA827X_H__2526#include <linux/i2c.h>27#include "dvb_frontend.h"2829struct tda827x_config30{31/* saa7134 - provided callbacks */32int (*init) (struct dvb_frontend *fe);33int (*sleep) (struct dvb_frontend *fe);3435/* interface to tda829x driver */36unsigned int config;37int switch_addr;3839void (*agcf)(struct dvb_frontend *fe);40};414243/**44* Attach a tda827x tuner to the supplied frontend structure.45*46* @param fe Frontend to attach to.47* @param addr i2c address of the tuner.48* @param i2c i2c adapter to use.49* @param cfg optional callback function pointers.50* @return FE pointer on success, NULL on failure.51*/52#if defined(CONFIG_MEDIA_TUNER_TDA827X) || (defined(CONFIG_MEDIA_TUNER_TDA827X_MODULE) && defined(MODULE))53extern struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe, int addr,54struct i2c_adapter *i2c,55struct tda827x_config *cfg);56#else57static inline struct dvb_frontend* tda827x_attach(struct dvb_frontend *fe,58int addr,59struct i2c_adapter *i2c,60struct tda827x_config *cfg)61{62printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);63return NULL;64}65#endif // CONFIG_MEDIA_TUNER_TDA827X6667#endif // __DVB_TDA827X_H__686970