blob: dfda44efa40c0c42c48d728e99dfd2c6be01b728 [file] [log] [blame]
Thomas Gleixner74ba9202019-05-20 09:19:02 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Steve Tothb79cb652006-01-09 15:25:07 -02002/*
3 Conexant cx24123/cx24109 - DVB QPSK Satellite demod/tuner driver
4
Steven Toth6d897612008-09-03 17:12:12 -03005 Copyright (C) 2005 Steven Toth <stoth@linuxtv.org>
Steve Tothb79cb652006-01-09 15:25:07 -02006
Steve Tothb79cb652006-01-09 15:25:07 -02007*/
8
9#ifndef CX24123_H
10#define CX24123_H
11
12#include <linux/dvb/frontend.h>
13
Steven Toth93504ab2008-10-16 20:28:32 -030014struct cx24123_config {
Steve Tothb79cb652006-01-09 15:25:07 -020015 /* the demodulator's i2c address */
16 u8 demod_address;
17
Steve Tothb79cb652006-01-09 15:25:07 -020018 /* Need to set device param for start_dma */
Steven Toth93504ab2008-10-16 20:28:32 -030019 int (*set_ts_params)(struct dvb_frontend *fe, int is_punctured);
Yeasah Pellef768562006-09-26 12:30:14 -030020
21 /* 0 = LNB voltage normal, 1 = LNB voltage inverted */
22 int lnb_polarity;
Patrick Boettcherca06fa72008-03-29 21:01:12 -030023
24 /* this device has another tuner */
25 u8 dont_use_pll;
26 void (*agc_callback) (struct dvb_frontend *);
Steve Tothb79cb652006-01-09 15:25:07 -020027};
28
Arnd Bergmann9b174522015-02-18 14:12:42 -030029#if IS_REACHABLE(CONFIG_DVB_CX24123)
Patrick Boettcherca06fa72008-03-29 21:01:12 -030030extern struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
31 struct i2c_adapter *i2c);
32extern struct i2c_adapter *cx24123_get_tuner_i2c_adapter(struct dvb_frontend *);
Andrew de Quincey102a3422006-08-08 09:10:08 -030033#else
Patrick Boettcherca06fa72008-03-29 21:01:12 -030034static inline struct dvb_frontend *cx24123_attach(
35 const struct cx24123_config *config, struct i2c_adapter *i2c)
Andrew de Quincey102a3422006-08-08 09:10:08 -030036{
Patrick Boettcherca06fa72008-03-29 21:01:12 -030037 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
38 return NULL;
39}
Hans Verkuil8b012fc2015-04-27 04:29:53 -030040static inline struct i2c_adapter *
Patrick Boettcherca06fa72008-03-29 21:01:12 -030041 cx24123_get_tuner_i2c_adapter(struct dvb_frontend *fe)
42{
43 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
Andrew de Quincey102a3422006-08-08 09:10:08 -030044 return NULL;
45}
Steven Toth93504ab2008-10-16 20:28:32 -030046#endif
Steve Tothb79cb652006-01-09 15:25:07 -020047
48#endif /* CX24123_H */