18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci Driver for STV0297 demodulator 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci Copyright (C) 2003-2004 Dennis Noermann <dennis.noermann@noernet.de> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci*/ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef STV0297_H 108c2ecf20Sopenharmony_ci#define STV0297_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h> 138c2ecf20Sopenharmony_ci#include <media/dvb_frontend.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_cistruct stv0297_config 168c2ecf20Sopenharmony_ci{ 178c2ecf20Sopenharmony_ci /* the demodulator's i2c address */ 188c2ecf20Sopenharmony_ci u8 demod_address; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci /* inittab - array of pairs of values. 218c2ecf20Sopenharmony_ci * First of each pair is the register, second is the value. 228c2ecf20Sopenharmony_ci * List should be terminated with an 0xff, 0xff pair. 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci u8* inittab; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci /* does the "inversion" need inverted? */ 278c2ecf20Sopenharmony_ci u8 invert:1; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci /* set to 1 if the device requires an i2c STOP during reading */ 308c2ecf20Sopenharmony_ci u8 stop_during_read:1; 318c2ecf20Sopenharmony_ci}; 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_STV0297) 348c2ecf20Sopenharmony_ciextern struct dvb_frontend* stv0297_attach(const struct stv0297_config* config, 358c2ecf20Sopenharmony_ci struct i2c_adapter* i2c); 368c2ecf20Sopenharmony_ci#else 378c2ecf20Sopenharmony_cistatic inline struct dvb_frontend* stv0297_attach(const struct stv0297_config* config, 388c2ecf20Sopenharmony_ci struct i2c_adapter* i2c) 398c2ecf20Sopenharmony_ci{ 408c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 418c2ecf20Sopenharmony_ci return NULL; 428c2ecf20Sopenharmony_ci} 438c2ecf20Sopenharmony_ci#endif // CONFIG_DVB_STV0297 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#endif // STV0297_H 46