18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci    Legend Silicon LGS-8GL5 DMB-TH OFDM demodulator driver
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci    Copyright (C) 2008 Sirius International (Hong Kong) Limited
68c2ecf20Sopenharmony_ci	Timothy Lee <timothy.lee@siriushk.com>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci*/
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifndef LGS8GL5_H
128c2ecf20Sopenharmony_ci#define LGS8GL5_H
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h>
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_cistruct lgs8gl5_config {
178c2ecf20Sopenharmony_ci	/* the demodulator's i2c address */
188c2ecf20Sopenharmony_ci	u8 demod_address;
198c2ecf20Sopenharmony_ci};
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_LGS8GL5)
228c2ecf20Sopenharmony_ciextern struct dvb_frontend *lgs8gl5_attach(
238c2ecf20Sopenharmony_ci	const struct lgs8gl5_config *config, struct i2c_adapter *i2c);
248c2ecf20Sopenharmony_ci#else
258c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *lgs8gl5_attach(
268c2ecf20Sopenharmony_ci	const struct lgs8gl5_config *config, struct i2c_adapter *i2c) {
278c2ecf20Sopenharmony_ci	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
288c2ecf20Sopenharmony_ci	return NULL;
298c2ecf20Sopenharmony_ci}
308c2ecf20Sopenharmony_ci#endif /* CONFIG_DVB_LGS8GL5 */
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#endif /* LGS8GL5_H */
33