Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner
0004  *
0005  * Copyright (C) 2010 Malcolm Priestley
0006  */
0007 
0008 #ifndef DVB_IX2505V_H
0009 #define DVB_IX2505V_H
0010 
0011 #include <linux/i2c.h>
0012 #include <media/dvb_frontend.h>
0013 
0014 /**
0015  * struct ix2505v_config - ix2505 attachment configuration
0016  *
0017  * @tuner_address: tuner address
0018  * @tuner_gain: Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB
0019  * @tuner_chargepump: Charge pump output +/- 0=120 1=260 2=555 3=1200(default)
0020  * @min_delay_ms: delay after tune
0021  * @tuner_write_only: disables reads
0022  */
0023 struct ix2505v_config {
0024     u8 tuner_address;
0025     u8 tuner_gain;
0026     u8 tuner_chargepump;
0027     int min_delay_ms;
0028     u8 tuner_write_only;
0029 
0030 };
0031 
0032 #if IS_REACHABLE(CONFIG_DVB_IX2505V)
0033 /**
0034  * ix2505v_attach - Attach a ix2505v tuner to the supplied frontend structure.
0035  *
0036  * @fe: Frontend to attach to.
0037  * @config: pointer to &struct ix2505v_config
0038  * @i2c: pointer to &struct i2c_adapter.
0039  *
0040  * return: FE pointer on success, NULL on failure.
0041  */
0042 extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
0043     const struct ix2505v_config *config, struct i2c_adapter *i2c);
0044 #else
0045 static inline struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
0046     const struct ix2505v_config *config, struct i2c_adapter *i2c)
0047 {
0048     printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
0049     return NULL;
0050 }
0051 #endif
0052 
0053 #endif /* DVB_IX2505V_H */