brintos

brintos / linux-shallow public Read only

0
0
Text · 1.8 KiB · f6063e4 Raw
71 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3    Samsung S5H1409 VSB/QAM demodulator driver4 5    Copyright (C) 2006 Steven Toth <stoth@linuxtv.org>6 7 8*/9 10#ifndef __S5H1409_H__11#define __S5H1409_H__12 13#include <linux/dvb/frontend.h>14 15struct s5h1409_config {16	/* the demodulator's i2c address */17	u8 demod_address;18 19	/* serial/parallel output */20#define S5H1409_PARALLEL_OUTPUT 021#define S5H1409_SERIAL_OUTPUT   122	u8 output_mode;23 24	/* GPIO Setting */25#define S5H1409_GPIO_OFF 026#define S5H1409_GPIO_ON  127	u8 gpio;28 29	/* IF Freq for QAM in KHz, VSB is hardcoded to 5380 */30	u16 qam_if;31 32	/* Spectral Inversion */33#define S5H1409_INVERSION_OFF 034#define S5H1409_INVERSION_ON  135	u8 inversion;36 37	/* Return lock status based on tuner lock, or demod lock */38#define S5H1409_TUNERLOCKING 039#define S5H1409_DEMODLOCKING 140	u8 status_mode;41 42	/* MPEG signal timing */43#define S5H1409_MPEGTIMING_CONTINUOUS_INVERTING_CLOCK       044#define S5H1409_MPEGTIMING_CONTINUOUS_NONINVERTING_CLOCK    145#define S5H1409_MPEGTIMING_NONCONTINUOUS_INVERTING_CLOCK    246#define S5H1409_MPEGTIMING_NONCONTINUOUS_NONINVERTING_CLOCK 347	u16 mpeg_timing;48 49	/* HVR-1600 optimizations (to better work with MXL5005s)50	   Note: some of these are likely to be folded into the generic driver51	   after being regression tested with other boards */52#define S5H1409_HVR1600_NOOPTIMIZE 053#define S5H1409_HVR1600_OPTIMIZE   154	u8 hvr1600_opt;55};56 57#if IS_REACHABLE(CONFIG_DVB_S5H1409)58extern struct dvb_frontend *s5h1409_attach(const struct s5h1409_config *config,59					   struct i2c_adapter *i2c);60#else61static inline struct dvb_frontend *s5h1409_attach(62	const struct s5h1409_config *config,63	struct i2c_adapter *i2c)64{65	printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);66	return NULL;67}68#endif /* CONFIG_DVB_S5H1409 */69 70#endif /* __S5H1409_H__ */71