Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003     NXP TDA10048HN DVB OFDM demodulator driver
0004 
0005     Copyright (C) 2009 Steven Toth <stoth@kernellabs.com>
0006 
0007 
0008 */
0009 
0010 #ifndef TDA10048_H
0011 #define TDA10048_H
0012 
0013 #include <linux/dvb/frontend.h>
0014 #include <linux/firmware.h>
0015 
0016 struct tda10048_config {
0017 
0018     /* the demodulator's i2c address */
0019     u8 demod_address;
0020 
0021     /* serial/parallel output */
0022 #define TDA10048_PARALLEL_OUTPUT 0
0023 #define TDA10048_SERIAL_OUTPUT   1
0024     u8 output_mode;
0025 
0026 #define TDA10048_BULKWRITE_200  200
0027 #define TDA10048_BULKWRITE_50   50
0028     u8 fwbulkwritelen;
0029 
0030     /* Spectral Inversion */
0031 #define TDA10048_INVERSION_OFF 0
0032 #define TDA10048_INVERSION_ON  1
0033     u8 inversion;
0034 
0035 #define TDA10048_IF_3300  3300
0036 #define TDA10048_IF_3500  3500
0037 #define TDA10048_IF_3800  3800
0038 #define TDA10048_IF_4000  4000
0039 #define TDA10048_IF_4300  4300
0040 #define TDA10048_IF_4500  4500
0041 #define TDA10048_IF_4750  4750
0042 #define TDA10048_IF_5000  5000
0043 #define TDA10048_IF_36130 36130
0044     u16 dtv6_if_freq_khz;
0045     u16 dtv7_if_freq_khz;
0046     u16 dtv8_if_freq_khz;
0047 
0048 #define TDA10048_CLK_4000  4000
0049 #define TDA10048_CLK_16000 16000
0050     u16 clk_freq_khz;
0051 
0052     /* Disable I2C gate access */
0053     u8 disable_gate_access;
0054 
0055     bool no_firmware;
0056 
0057     bool set_pll;
0058     u8 pll_m;
0059     u8 pll_p;
0060     u8 pll_n;
0061 };
0062 
0063 #if IS_REACHABLE(CONFIG_DVB_TDA10048)
0064 extern struct dvb_frontend *tda10048_attach(
0065     const struct tda10048_config *config,
0066     struct i2c_adapter *i2c);
0067 #else
0068 static inline struct dvb_frontend *tda10048_attach(
0069     const struct tda10048_config *config,
0070     struct i2c_adapter *i2c)
0071 {
0072     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0073     return NULL;
0074 }
0075 #endif /* CONFIG_DVB_TDA10048 */
0076 
0077 #endif /* TDA10048_H */