1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 STV6110(A) Silicon tuner driver
5 Copyright (C) Manu Abraham <abraham.manu@gmail.com>
7 Copyright (C) ST Microelectronics
14 struct stv6110x_config
{
17 u8 clk_div
; /* divisor value for the output clock */
18 struct dvb_frontend
*frontend
;
20 struct stv6110x_devctl
* (*get_devctl
)(struct i2c_client
*i2c
);
29 TUNER_PHASELOCKED
= 1,
32 struct stv6110x_devctl
{
33 int (*tuner_init
) (struct dvb_frontend
*fe
);
34 int (*tuner_sleep
) (struct dvb_frontend
*fe
);
35 int (*tuner_set_mode
) (struct dvb_frontend
*fe
, enum tuner_mode mode
);
36 int (*tuner_set_frequency
) (struct dvb_frontend
*fe
, u32 frequency
);
37 int (*tuner_get_frequency
) (struct dvb_frontend
*fe
, u32
*frequency
);
38 int (*tuner_set_bandwidth
) (struct dvb_frontend
*fe
, u32 bandwidth
);
39 int (*tuner_get_bandwidth
) (struct dvb_frontend
*fe
, u32
*bandwidth
);
40 int (*tuner_set_bbgain
) (struct dvb_frontend
*fe
, u32 gain
);
41 int (*tuner_get_bbgain
) (struct dvb_frontend
*fe
, u32
*gain
);
42 int (*tuner_set_refclk
) (struct dvb_frontend
*fe
, u32 refclk
);
43 int (*tuner_get_status
) (struct dvb_frontend
*fe
, u32
*status
);
47 #if IS_REACHABLE(CONFIG_DVB_STV6110x)
49 extern const struct stv6110x_devctl
*stv6110x_attach(struct dvb_frontend
*fe
,
50 const struct stv6110x_config
*config
,
51 struct i2c_adapter
*i2c
);
54 static inline const struct stv6110x_devctl
*stv6110x_attach(struct dvb_frontend
*fe
,
55 const struct stv6110x_config
*config
,
56 struct i2c_adapter
*i2c
)
58 printk(KERN_WARNING
"%s: driver disabled by Kconfig\n", __func__
);
62 #endif /* CONFIG_DVB_STV6110x */
64 #endif /* __STV6110x_H */