Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * stv6110.h
0004  *
0005  * Driver for ST STV6110 satellite tuner IC.
0006  *
0007  * Copyright (C) 2009 NetUP Inc.
0008  * Copyright (C) 2009 Igor M. Liplianin <liplianin@netup.ru>
0009  */
0010 
0011 #ifndef __DVB_STV6110_H__
0012 #define __DVB_STV6110_H__
0013 
0014 #include <linux/i2c.h>
0015 #include <media/dvb_frontend.h>
0016 
0017 /* registers */
0018 #define RSTV6110_CTRL1      0
0019 #define RSTV6110_CTRL2      1
0020 #define RSTV6110_TUNING1    2
0021 #define RSTV6110_TUNING2    3
0022 #define RSTV6110_CTRL3      4
0023 #define RSTV6110_STAT1      5
0024 #define RSTV6110_STAT2      6
0025 #define RSTV6110_STAT3      7
0026 
0027 struct stv6110_config {
0028     u8 i2c_address;
0029     u32 mclk;
0030     u8 gain;
0031     u8 clk_div; /* divisor value for the output clock */
0032 };
0033 
0034 #if IS_REACHABLE(CONFIG_DVB_STV6110)
0035 extern struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
0036                     const struct stv6110_config *config,
0037                     struct i2c_adapter *i2c);
0038 #else
0039 static inline struct dvb_frontend *stv6110_attach(struct dvb_frontend *fe,
0040                     const struct stv6110_config *config,
0041                     struct i2c_adapter *i2c)
0042 {
0043     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0044     return NULL;
0045 }
0046 #endif
0047 
0048 #endif