18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *    Support for OR51132 (pcHDTV HD-3000) - VSB/QAM
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *    Copyright (C) 2005 Kirk Lapray <kirk_lapray@bigfoot.com>
68c2ecf20Sopenharmony_ci*/
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef OR51132_H
98c2ecf20Sopenharmony_ci#define OR51132_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/firmware.h>
128c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_cistruct or51132_config
158c2ecf20Sopenharmony_ci{
168c2ecf20Sopenharmony_ci	/* The demodulator's i2c address */
178c2ecf20Sopenharmony_ci	u8 demod_address;
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci	/* Need to set device param for start_dma */
208c2ecf20Sopenharmony_ci	int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);
218c2ecf20Sopenharmony_ci};
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_OR51132)
248c2ecf20Sopenharmony_ciextern struct dvb_frontend* or51132_attach(const struct or51132_config* config,
258c2ecf20Sopenharmony_ci					   struct i2c_adapter* i2c);
268c2ecf20Sopenharmony_ci#else
278c2ecf20Sopenharmony_cistatic inline struct dvb_frontend* or51132_attach(const struct or51132_config* config,
288c2ecf20Sopenharmony_ci					   struct i2c_adapter* i2c)
298c2ecf20Sopenharmony_ci{
308c2ecf20Sopenharmony_ci	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
318c2ecf20Sopenharmony_ci	return NULL;
328c2ecf20Sopenharmony_ci}
338c2ecf20Sopenharmony_ci#endif // CONFIG_DVB_OR51132
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci#endif // OR51132_H
36