18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci	TDA665x tuner driver
48c2ecf20Sopenharmony_ci	Copyright (C) Manu Abraham (abraham.manu@gmail.com)
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci*/
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef __TDA665x_H
98c2ecf20Sopenharmony_ci#define __TDA665x_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_cistruct tda665x_config {
128c2ecf20Sopenharmony_ci	char name[128];
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci	u8	addr;
158c2ecf20Sopenharmony_ci	u32	frequency_min;
168c2ecf20Sopenharmony_ci	u32	frequency_max;
178c2ecf20Sopenharmony_ci	u32	frequency_offst;
188c2ecf20Sopenharmony_ci	u32	ref_multiplier;
198c2ecf20Sopenharmony_ci	u32	ref_divider;
208c2ecf20Sopenharmony_ci};
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#if IS_REACHABLE(CONFIG_DVB_TDA665x)
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ciextern struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
258c2ecf20Sopenharmony_ci					   const struct tda665x_config *config,
268c2ecf20Sopenharmony_ci					   struct i2c_adapter *i2c);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci#else
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cistatic inline struct dvb_frontend *tda665x_attach(struct dvb_frontend *fe,
318c2ecf20Sopenharmony_ci						  const struct tda665x_config *config,
328c2ecf20Sopenharmony_ci						  struct i2c_adapter *i2c)
338c2ecf20Sopenharmony_ci{
348c2ecf20Sopenharmony_ci	printk(KERN_WARNING "%s: Driver disabled by Kconfig\n", __func__);
358c2ecf20Sopenharmony_ci	return NULL;
368c2ecf20Sopenharmony_ci}
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif /* CONFIG_DVB_TDA665x */
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci#endif /* __TDA665x_H */
41