18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci    Conexant cx24117/cx24132 - Dual DVBS/S2 Satellite demod/tuner driver
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci    Copyright (C) 2013 Luis Alves <ljalvs@gmail.com>
68c2ecf20Sopenharmony_ci	(based on cx24116.h by Steven Toth)
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci*/
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef CX24117_H
118c2ecf20Sopenharmony_ci#define CX24117_H
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h>
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_cistruct cx24117_config {
168c2ecf20Sopenharmony_ci	/* the demodulator's i2c address */
178c2ecf20Sopenharmony_ci	u8 demod_address;
188c2ecf20Sopenharmony_ci};
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_CX24117)
218c2ecf20Sopenharmony_ciextern struct dvb_frontend *cx24117_attach(
228c2ecf20Sopenharmony_ci	const struct cx24117_config *config,
238c2ecf20Sopenharmony_ci	struct i2c_adapter *i2c);
248c2ecf20Sopenharmony_ci#else
258c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *cx24117_attach(
268c2ecf20Sopenharmony_ci	const struct cx24117_config *config,
278c2ecf20Sopenharmony_ci	struct i2c_adapter *i2c)
288c2ecf20Sopenharmony_ci{
298c2ecf20Sopenharmony_ci	dev_warn(&i2c->dev, "%s: driver disabled by Kconfig\n", __func__);
308c2ecf20Sopenharmony_ci	return NULL;
318c2ecf20Sopenharmony_ci}
328c2ecf20Sopenharmony_ci#endif
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#endif /* CX24117_H */
35