Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Conexant CX24120/CX24118 - DVB-S/S2 demod/tuner driver
0004  *
0005  * Copyright (C) 2008 Patrick Boettcher <pb@linuxtv.org>
0006  * Copyright (C) 2009 Sergey Tyurin <forum.free-x.de>
0007  * Updated 2012 by Jannis Achstetter <jannis_achstetter@web.de>
0008  * Copyright (C) 2015 Jemma Denson <jdenson@gmail.com>
0009  */
0010 
0011 #ifndef CX24120_H
0012 #define CX24120_H
0013 
0014 #include <linux/dvb/frontend.h>
0015 #include <linux/firmware.h>
0016 
0017 struct cx24120_initial_mpeg_config {
0018     u8 x1;
0019     u8 x2;
0020     u8 x3;
0021 };
0022 
0023 struct cx24120_config {
0024     u8 i2c_addr;
0025     u32 xtal_khz;
0026     struct cx24120_initial_mpeg_config initial_mpeg_config;
0027 
0028     int (*request_firmware)(struct dvb_frontend *fe,
0029                 const struct firmware **fw, char *name);
0030 
0031     /* max bytes I2C provider can write at once */
0032     u16 i2c_wr_max;
0033 };
0034 
0035 #if IS_REACHABLE(CONFIG_DVB_CX24120)
0036 struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
0037                     struct i2c_adapter *i2c);
0038 #else
0039 static inline
0040 struct dvb_frontend *cx24120_attach(const struct cx24120_config *config,
0041                     struct i2c_adapter *i2c)
0042 {
0043     pr_warn("%s: driver disabled by Kconfig\n", __func__);
0044     return NULL;
0045 }
0046 #endif
0047 
0048 #endif /* CX24120_H */