18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Silicon Labs Si2168 DVB-T/T2/C demodulator driver
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef SI2168_H
98c2ecf20Sopenharmony_ci#define SI2168_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/dvb/frontend.h>
128c2ecf20Sopenharmony_ci/**
138c2ecf20Sopenharmony_ci * struct si2168_config - configuration parameters for si2168
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * @fe:
168c2ecf20Sopenharmony_ci *	frontend returned by driver
178c2ecf20Sopenharmony_ci * @i2c_adapter:
188c2ecf20Sopenharmony_ci *	tuner I2C adapter returned by driver
198c2ecf20Sopenharmony_ci * @ts_mode:
208c2ecf20Sopenharmony_ci *	Transport Stream mode. Can be:
218c2ecf20Sopenharmony_ci *	- %SI2168_TS_PARALLEL
228c2ecf20Sopenharmony_ci *	- %SI2168_TS_SERIAL
238c2ecf20Sopenharmony_ci *	- %SI2168_TS_TRISTATE
248c2ecf20Sopenharmony_ci *	- %SI2168_TS_CLK_MANUAL
258c2ecf20Sopenharmony_ci * @ts_clock_inv:
268c2ecf20Sopenharmony_ci *	TS clock inverted
278c2ecf20Sopenharmony_ci * @ts_clock_gapped:
288c2ecf20Sopenharmony_ci *	TS clock gapped
298c2ecf20Sopenharmony_ci * @spectral_inversion:
308c2ecf20Sopenharmony_ci *	Inverted spectrum
318c2ecf20Sopenharmony_ci *
328c2ecf20Sopenharmony_ci * Note:
338c2ecf20Sopenharmony_ci *	The I2C address of this demod is 0x64.
348c2ecf20Sopenharmony_ci */
358c2ecf20Sopenharmony_cistruct si2168_config {
368c2ecf20Sopenharmony_ci	struct dvb_frontend **fe;
378c2ecf20Sopenharmony_ci	struct i2c_adapter **i2c_adapter;
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci#define SI2168_TS_PARALLEL	0x06
408c2ecf20Sopenharmony_ci#define SI2168_TS_SERIAL	0x03
418c2ecf20Sopenharmony_ci#define SI2168_TS_TRISTATE	0x00
428c2ecf20Sopenharmony_ci#define SI2168_TS_CLK_MANUAL	0x20
438c2ecf20Sopenharmony_ci	u8 ts_mode;
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci	/* Flags */
468c2ecf20Sopenharmony_ci	unsigned int ts_clock_inv:1;
478c2ecf20Sopenharmony_ci	unsigned int ts_clock_gapped:1;
488c2ecf20Sopenharmony_ci	unsigned int spectral_inversion:1;
498c2ecf20Sopenharmony_ci};
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#endif
52