18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci    Driver for VES1893 and VES1993 QPSK Demodulators
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci    Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
68c2ecf20Sopenharmony_ci    Copyright (C) 2001 Ronny Strutz <3des@elitedvb.de>
78c2ecf20Sopenharmony_ci    Copyright (C) 2002 Dennis Noermann <dennis.noermann@noernet.de>
88c2ecf20Sopenharmony_ci    Copyright (C) 2002-2003 Andreas Oberritter <obi@linuxtv.org>
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci*/
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#ifndef VES1X93_H
148c2ecf20Sopenharmony_ci#define VES1X93_H
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h>
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistruct ves1x93_config
198c2ecf20Sopenharmony_ci{
208c2ecf20Sopenharmony_ci	/* the demodulator's i2c address */
218c2ecf20Sopenharmony_ci	u8 demod_address;
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci	/* value of XIN to use */
248c2ecf20Sopenharmony_ci	u32 xin;
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci	/* should PWM be inverted? */
278c2ecf20Sopenharmony_ci	u8 invert_pwm:1;
288c2ecf20Sopenharmony_ci};
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_VES1X93)
318c2ecf20Sopenharmony_ciextern struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config,
328c2ecf20Sopenharmony_ci					   struct i2c_adapter* i2c);
338c2ecf20Sopenharmony_ci#else
348c2ecf20Sopenharmony_cistatic inline struct dvb_frontend* ves1x93_attach(const struct ves1x93_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#endif // CONFIG_DVB_VES1X93
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci#endif // VES1X93_H
43