78 lines · c
1/* SPDX-License-Identifier: GPL-2.0-or-later */2/*3 NXP TDA10048HN DVB OFDM demodulator driver4 5 Copyright (C) 2009 Steven Toth <stoth@kernellabs.com>6 7 8*/9 10#ifndef TDA10048_H11#define TDA10048_H12 13#include <linux/dvb/frontend.h>14#include <linux/firmware.h>15 16struct tda10048_config {17 18 /* the demodulator's i2c address */19 u8 demod_address;20 21 /* serial/parallel output */22#define TDA10048_PARALLEL_OUTPUT 023#define TDA10048_SERIAL_OUTPUT 124 u8 output_mode;25 26#define TDA10048_BULKWRITE_200 20027#define TDA10048_BULKWRITE_50 5028 u8 fwbulkwritelen;29 30 /* Spectral Inversion */31#define TDA10048_INVERSION_OFF 032#define TDA10048_INVERSION_ON 133 u8 inversion;34 35#define TDA10048_IF_3300 330036#define TDA10048_IF_3500 350037#define TDA10048_IF_3800 380038#define TDA10048_IF_4000 400039#define TDA10048_IF_4300 430040#define TDA10048_IF_4500 450041#define TDA10048_IF_4750 475042#define TDA10048_IF_5000 500043#define TDA10048_IF_36130 3613044 u16 dtv6_if_freq_khz;45 u16 dtv7_if_freq_khz;46 u16 dtv8_if_freq_khz;47 48#define TDA10048_CLK_4000 400049#define TDA10048_CLK_16000 1600050 u16 clk_freq_khz;51 52 /* Disable I2C gate access */53 u8 disable_gate_access;54 55 bool no_firmware;56 57 bool set_pll;58 u8 pll_m;59 u8 pll_p;60 u8 pll_n;61};62 63#if IS_REACHABLE(CONFIG_DVB_TDA10048)64extern struct dvb_frontend *tda10048_attach(65 const struct tda10048_config *config,66 struct i2c_adapter *i2c);67#else68static inline struct dvb_frontend *tda10048_attach(69 const struct tda10048_config *config,70 struct i2c_adapter *i2c)71{72 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);73 return NULL;74}75#endif /* CONFIG_DVB_TDA10048 */76 77#endif /* TDA10048_H */78