Steven Toth | 52c99bd | 2008-05-01 04:57:01 -0300 | [diff] [blame] | 1 | /* |
Steven Toth | 5c1b205 | 2008-05-01 07:04:09 -0300 | [diff] [blame^] | 2 | * For the Realtek RTL chip RTL2831U |
| 3 | * Realtek Release Date: 2008-03-14, ver 080314 |
| 4 | * Realtek version RTL2831 Linux driver version 080314 |
| 5 | * ver 080314 |
| 6 | * |
| 7 | * for linux kernel version 2.6.21.4 - 2.6.22-14 |
| 8 | * support MXL5005s and MT2060 tuners (support tuner auto-detecting) |
| 9 | * support two IR types -- RC5 and NEC |
| 10 | * |
| 11 | * Known boards with Realtek RTL chip RTL2821U |
| 12 | * Freecom USB stick 14aa:0160 (version 4) |
| 13 | * Conceptronic CTVDIGRCU |
| 14 | * |
| 15 | * Copyright (c) 2008 Realtek |
| 16 | * Copyright (c) 2008 Jan Hoogenraad, Barnaby Shearer, Andy Hasper |
| 17 | * This code is placed under the terms of the GNU General Public License |
| 18 | * |
| 19 | * Released by Realtek under GPLv2. |
| 20 | * Thanks to Realtek for a lot of support we received ! |
| 21 | * |
| 22 | * Revision: 080314 - original version |
| 23 | */ |
Steven Toth | 52c99bd | 2008-05-01 04:57:01 -0300 | [diff] [blame] | 24 | |
| 25 | |
Steven Toth | 2637d5b | 2008-05-01 05:01:31 -0300 | [diff] [blame] | 26 | #ifndef __MXL5005S_H |
| 27 | #define __MXL5005S_H |
Steven Toth | 52c99bd | 2008-05-01 04:57:01 -0300 | [diff] [blame] | 28 | |
Steven Toth | 5c1b205 | 2008-05-01 07:04:09 -0300 | [diff] [blame^] | 29 | #include <linux/dvb/frontend.h> |
| 30 | |
| 31 | /* IF frequency */ |
| 32 | enum IF_FREQ_HZ |
| 33 | { |
| 34 | IF_FREQ_4570000HZ = 4570000, ///< IF frequency = 4.57 MHz |
| 35 | IF_FREQ_4571429HZ = 4571429, ///< IF frequency = 4.571 MHz |
| 36 | IF_FREQ_5380000HZ = 5380000, ///< IF frequency = 5.38 MHz |
| 37 | IF_FREQ_36000000HZ = 36000000, ///< IF frequency = 36.000 MHz |
| 38 | IF_FREQ_36125000HZ = 36125000, ///< IF frequency = 36.125 MHz |
| 39 | IF_FREQ_36166667HZ = 36166667, ///< IF frequency = 36.167 MHz |
| 40 | IF_FREQ_44000000HZ = 44000000, ///< IF frequency = 44.000 MHz |
| 41 | }; |
| 42 | |
| 43 | /* Crystal frequency */ |
| 44 | enum CRYSTAL_FREQ_HZ |
| 45 | { |
| 46 | CRYSTAL_FREQ_4000000HZ = 4000000, ///< Crystal frequency = 4.0 MHz |
| 47 | CRYSTAL_FREQ_16000000HZ = 16000000, ///< Crystal frequency = 16.0 MHz |
| 48 | CRYSTAL_FREQ_25000000HZ = 25000000, ///< Crystal frequency = 25.0 MHz |
| 49 | CRYSTAL_FREQ_28800000HZ = 28800000, ///< Crystal frequency = 28.8 MHz |
| 50 | }; |
| 51 | |
Steven Toth | 85d220d | 2008-05-01 05:48:14 -0300 | [diff] [blame] | 52 | struct mxl5005s_config |
| 53 | { |
| 54 | u8 i2c_address; |
Steven Toth | 2637d5b | 2008-05-01 05:01:31 -0300 | [diff] [blame] | 55 | |
Steven Toth | 85d220d | 2008-05-01 05:48:14 -0300 | [diff] [blame] | 56 | /* Stuff I don't know what to do with */ |
| 57 | u8 AgcMasterByte; |
| 58 | }; |
| 59 | |
Steven Toth | 5c1b205 | 2008-05-01 07:04:09 -0300 | [diff] [blame^] | 60 | #if defined(CONFIG_MEDIA_TUNER_MXL5005S) || (defined(CONFIG_MEDIA_TUNER_MXL5005S_MODULE) && defined(MODULE)) |
Steven Toth | 85d220d | 2008-05-01 05:48:14 -0300 | [diff] [blame] | 61 | extern struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe, |
| 62 | struct i2c_adapter *i2c, |
Steven Toth | 5c1b205 | 2008-05-01 07:04:09 -0300 | [diff] [blame^] | 63 | struct mxl5005s_config *config); |
Steven Toth | 52c99bd | 2008-05-01 04:57:01 -0300 | [diff] [blame] | 64 | #else |
Steven Toth | 85d220d | 2008-05-01 05:48:14 -0300 | [diff] [blame] | 65 | static inline struct dvb_frontend *mxl5005s_attach(struct dvb_frontend *fe, |
| 66 | struct i2c_adapter *i2c, |
Steven Toth | 7f5c3af | 2008-05-01 06:51:36 -0300 | [diff] [blame] | 67 | struct mxl5005s_config *config) |
Steven Toth | 52c99bd | 2008-05-01 04:57:01 -0300 | [diff] [blame] | 68 | { |
Steven Toth | 85d220d | 2008-05-01 05:48:14 -0300 | [diff] [blame] | 69 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
| 70 | return NULL; |
| 71 | } |
| 72 | #endif /* CONFIG_DVB_TUNER_MXL5005S */ |
Steven Toth | 52c99bd | 2008-05-01 04:57:01 -0300 | [diff] [blame] | 73 | |
Steven Toth | 2637d5b | 2008-05-01 05:01:31 -0300 | [diff] [blame] | 74 | #endif /* __MXL5005S_H */ |
Steven Toth | 52c99bd | 2008-05-01 04:57:01 -0300 | [diff] [blame] | 75 | |