blob: 559c12b97dbb9a9d0ddcf42f7c21eb48c2fd05b3 [file] [log] [blame]
Thomas Gleixnerc942fdd2019-05-27 08:55:06 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Michael Krufky017cf012006-09-23 20:40:20 -03002/*
Antti Palosaaricbdc80e2007-01-21 15:56:10 -03003 * Driver for Quantek QT1010 silicon tuner
4 *
5 * Copyright (C) 2006 Antti Palosaari <crope@iki.fi>
6 * Aapo Tahkola <aet@rasterburn.org>
Michael Krufky017cf012006-09-23 20:40:20 -03007 */
8
Antti Palosaaricbdc80e2007-01-21 15:56:10 -03009#ifndef QT1010_H
10#define QT1010_H
Michael Krufky017cf012006-09-23 20:40:20 -030011
Mauro Carvalho Chehabfada1932017-12-28 13:03:51 -050012#include <media/dvb_frontend.h>
Michael Krufky017cf012006-09-23 20:40:20 -030013
Antti Palosaaricbdc80e2007-01-21 15:56:10 -030014struct qt1010_config {
15 u8 i2c_address;
16};
17
18/**
19 * Attach a qt1010 tuner to the supplied frontend structure.
20 *
21 * @param fe frontend to attach to
22 * @param i2c i2c adapter to use
23 * @param cfg tuner hw based configuration
24 * @return fe pointer on success, NULL on failure
25 */
Arnd Bergmann9b174522015-02-18 14:12:42 -030026#if IS_REACHABLE(CONFIG_MEDIA_TUNER_QT1010)
Antti Palosaaricbdc80e2007-01-21 15:56:10 -030027extern struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe,
28 struct i2c_adapter *i2c,
29 struct qt1010_config *cfg);
30#else
31static inline struct dvb_frontend *qt1010_attach(struct dvb_frontend *fe,
32 struct i2c_adapter *i2c,
33 struct qt1010_config *cfg)
Michael Krufky017cf012006-09-23 20:40:20 -030034{
Harvey Harrison271ddbf2008-04-08 23:20:00 -030035 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
Antti Palosaaricbdc80e2007-01-21 15:56:10 -030036 return NULL;
Michael Krufky017cf012006-09-23 20:40:20 -030037}
Mauro Carvalho Chehab149ef722008-04-29 21:38:46 -030038#endif // CONFIG_MEDIA_TUNER_QT1010
Michael Krufky017cf012006-09-23 20:40:20 -030039
Michael Krufky017cf012006-09-23 20:40:20 -030040#endif