18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci TDA8261 8PSK/QPSK tuner driver 48c2ecf20Sopenharmony_ci Copyright (C) Manu Abraham (abraham.manu@gmail.com) 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci*/ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef __TDA8261_H 98c2ecf20Sopenharmony_ci#define __TDA8261_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cienum tda8261_step { 128c2ecf20Sopenharmony_ci TDA8261_STEP_2000 = 0, /* 2000 kHz */ 138c2ecf20Sopenharmony_ci TDA8261_STEP_1000, /* 1000 kHz */ 148c2ecf20Sopenharmony_ci TDA8261_STEP_500, /* 500 kHz */ 158c2ecf20Sopenharmony_ci TDA8261_STEP_250, /* 250 kHz */ 168c2ecf20Sopenharmony_ci TDA8261_STEP_125 /* 125 kHz */ 178c2ecf20Sopenharmony_ci}; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistruct tda8261_config { 208c2ecf20Sopenharmony_ci// u8 buf[16]; 218c2ecf20Sopenharmony_ci u8 addr; 228c2ecf20Sopenharmony_ci enum tda8261_step step_size; 238c2ecf20Sopenharmony_ci}; 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_TDA8261) 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciextern struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe, 288c2ecf20Sopenharmony_ci const struct tda8261_config *config, 298c2ecf20Sopenharmony_ci struct i2c_adapter *i2c); 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#else 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *tda8261_attach(struct dvb_frontend *fe, 348c2ecf20Sopenharmony_ci const struct tda8261_config *config, 358c2ecf20Sopenharmony_ci struct i2c_adapter *i2c) 368c2ecf20Sopenharmony_ci{ 378c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__); 388c2ecf20Sopenharmony_ci return NULL; 398c2ecf20Sopenharmony_ci} 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#endif //CONFIG_DVB_TDA8261 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#endif// __TDA8261_H 44