^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-or-later */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * stv6110.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * Driver for ST STV6110 satellite tuner IC.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright (C) 2009 NetUP Inc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #ifndef __DVB_STV6110_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define __DVB_STV6110_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <media/dvb_frontend.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) /* registers */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define RSTV6110_CTRL1 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define RSTV6110_CTRL2 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define RSTV6110_TUNING1 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define RSTV6110_TUNING2 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define RSTV6110_CTRL3 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define RSTV6110_STAT1 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define RSTV6110_STAT2 6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define RSTV6110_STAT3 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) struct stv6110_config {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) u8 i2c_address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) u32 mclk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) u8 gain;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) u8 clk_div; /* divisor value for the output clock */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #if IS_REACHABLE(CONFIG_DVB_STV6110)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) const struct stv6110_config *config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) struct i2c_adapter *i2c);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) const struct stv6110_config *config,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) struct i2c_adapter *i2c)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #endif