18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * NXP TDA18218HN silicon tuner driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2010 Antti Palosaari <crope@iki.fi> 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef TDA18218_H 98c2ecf20Sopenharmony_ci#define TDA18218_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <media/dvb_frontend.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistruct tda18218_config { 148c2ecf20Sopenharmony_ci u8 i2c_address; 158c2ecf20Sopenharmony_ci u8 i2c_wr_max; 168c2ecf20Sopenharmony_ci u8 loop_through:1; 178c2ecf20Sopenharmony_ci}; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_MEDIA_TUNER_TDA18218) 208c2ecf20Sopenharmony_ciextern struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe, 218c2ecf20Sopenharmony_ci struct i2c_adapter *i2c, struct tda18218_config *cfg); 228c2ecf20Sopenharmony_ci#else 238c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe, 248c2ecf20Sopenharmony_ci struct i2c_adapter *i2c, struct tda18218_config *cfg) 258c2ecf20Sopenharmony_ci{ 268c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 278c2ecf20Sopenharmony_ci return NULL; 288c2ecf20Sopenharmony_ci} 298c2ecf20Sopenharmony_ci#endif 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#endif 32