18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Support for OR51211 (pcHDTV HD-2000) - VSB 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2005 Kirk Lapray <kirk_lapray@bigfoot.com> 68c2ecf20Sopenharmony_ci*/ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef OR51211_H 98c2ecf20Sopenharmony_ci#define OR51211_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h> 128c2ecf20Sopenharmony_ci#include <linux/firmware.h> 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_cistruct or51211_config 158c2ecf20Sopenharmony_ci{ 168c2ecf20Sopenharmony_ci /* The demodulator's i2c address */ 178c2ecf20Sopenharmony_ci u8 demod_address; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci /* Request firmware for device */ 208c2ecf20Sopenharmony_ci int (*request_firmware)(struct dvb_frontend* fe, const struct firmware **fw, char* name); 218c2ecf20Sopenharmony_ci void (*setmode)(struct dvb_frontend * fe, int mode); 228c2ecf20Sopenharmony_ci void (*reset)(struct dvb_frontend * fe); 238c2ecf20Sopenharmony_ci void (*sleep)(struct dvb_frontend * fe); 248c2ecf20Sopenharmony_ci}; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_OR51211) 278c2ecf20Sopenharmony_ciextern struct dvb_frontend* or51211_attach(const struct or51211_config* config, 288c2ecf20Sopenharmony_ci struct i2c_adapter* i2c); 298c2ecf20Sopenharmony_ci#else 308c2ecf20Sopenharmony_cistatic inline struct dvb_frontend* or51211_attach(const struct or51211_config* config, 318c2ecf20Sopenharmony_ci struct i2c_adapter* i2c) 328c2ecf20Sopenharmony_ci{ 338c2ecf20Sopenharmony_ci printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); 348c2ecf20Sopenharmony_ci return NULL; 358c2ecf20Sopenharmony_ci} 368c2ecf20Sopenharmony_ci#endif // CONFIG_DVB_OR51211 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#endif // OR51211_H 398c2ecf20Sopenharmony_ci 40