18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Driver for the ST STV0910 DVB-S/S2 demodulator. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2014-2015 Ralph Metzler <rjkm@metzlerbros.de> 68c2ecf20Sopenharmony_ci * Marcus Metzler <mocm@metzlerbros.de> 78c2ecf20Sopenharmony_ci * developed for Digital Devices GmbH 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or 108c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License 118c2ecf20Sopenharmony_ci * version 2 only, as published by the Free Software Foundation. 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * This program is distributed in the hope that it will be useful, 148c2ecf20Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 158c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 168c2ecf20Sopenharmony_ci * GNU General Public License for more details. 178c2ecf20Sopenharmony_ci */ 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#ifndef _STV0910_H_ 208c2ecf20Sopenharmony_ci#define _STV0910_H_ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#include <linux/types.h> 238c2ecf20Sopenharmony_ci#include <linux/i2c.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_cistruct stv0910_cfg { 268c2ecf20Sopenharmony_ci u32 clk; 278c2ecf20Sopenharmony_ci u8 adr; 288c2ecf20Sopenharmony_ci u8 parallel; 298c2ecf20Sopenharmony_ci u8 rptlvl; 308c2ecf20Sopenharmony_ci u8 single; 318c2ecf20Sopenharmony_ci u8 tsspeed; 328c2ecf20Sopenharmony_ci}; 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_STV0910) 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cistruct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c, 378c2ecf20Sopenharmony_ci struct stv0910_cfg *cfg, int nr); 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#else 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *stv0910_attach(struct i2c_adapter *i2c, 428c2ecf20Sopenharmony_ci struct stv0910_cfg *cfg, 438c2ecf20Sopenharmony_ci int nr) 448c2ecf20Sopenharmony_ci{ 458c2ecf20Sopenharmony_ci pr_warn("%s: driver disabled by Kconfig\n", __func__); 468c2ecf20Sopenharmony_ci return NULL; 478c2ecf20Sopenharmony_ci} 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#endif /* CONFIG_DVB_STV0910 */ 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#endif /* _STV0910_H_ */ 52