Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 2 | * descriptions + helper functions for simple dvb plls. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | */ |
| 4 | |
Johannes Stezenbach | 5e9e722 | 2005-05-16 21:54:37 -0700 | [diff] [blame] | 5 | #ifndef __DVB_PLL_H__ |
| 6 | #define __DVB_PLL_H__ |
| 7 | |
Andrew de Quincey | 272bc4d | 2006-04-18 17:47:12 -0300 | [diff] [blame] | 8 | #include <linux/i2c.h> |
| 9 | #include "dvb_frontend.h" |
| 10 | |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 11 | #define DVB_PLL_UNDEFINED 0 |
| 12 | #define DVB_PLL_THOMSON_DTT7579 1 |
| 13 | #define DVB_PLL_THOMSON_DTT759X 2 |
Michael Krufky | b6fd549e | 2008-04-22 14:46:20 -0300 | [diff] [blame] | 14 | #define DVB_PLL_LG_Z201 3 |
| 15 | #define DVB_PLL_UNKNOWN_1 4 |
| 16 | #define DVB_PLL_TUA6010XS 5 |
| 17 | #define DVB_PLL_ENV57H1XD5 6 |
| 18 | #define DVB_PLL_TUA6034 7 |
| 19 | #define DVB_PLL_TDA665X 8 |
| 20 | #define DVB_PLL_TDED4 9 |
| 21 | #define DVB_PLL_TDHU2 10 |
| 22 | #define DVB_PLL_SAMSUNG_TBMV 11 |
| 23 | #define DVB_PLL_PHILIPS_SD1878_TDA8261 12 |
| 24 | #define DVB_PLL_OPERA1 13 |
Antti Palosaari | 139dfeb | 2008-05-17 23:02:00 -0300 | [diff] [blame] | 25 | #define DVB_PLL_SAMSUNG_DTOS403IH102A 14 |
Trent Piepho | a104ed0 | 2009-06-11 19:21:34 -0300 | [diff] [blame] | 26 | #define DVB_PLL_SAMSUNG_TDTC9251DH0 15 |
Trent Piepho | f52c485 | 2009-06-11 19:21:34 -0300 | [diff] [blame] | 27 | #define DVB_PLL_SAMSUNG_TBDU18132 16 |
Trent Piepho | 9d5d75a | 2009-06-11 19:21:34 -0300 | [diff] [blame] | 28 | #define DVB_PLL_SAMSUNG_TBMU24112 17 |
Trent Piepho | d799ce5 | 2009-06-11 19:24:00 -0300 | [diff] [blame] | 29 | #define DVB_PLL_TDEE4 18 |
Patrice Chotard | 5fb6707 | 2012-07-31 15:31:20 -0300 | [diff] [blame] | 30 | #define DVB_PLL_THOMSON_DTT7520X 19 |
Chris Pascoe | 780dfef | 2006-02-28 08:34:59 -0300 | [diff] [blame] | 31 | |
Andrew de Quincey | 272bc4d | 2006-04-18 17:47:12 -0300 | [diff] [blame] | 32 | /** |
| 33 | * Attach a dvb-pll to the supplied frontend structure. |
| 34 | * |
| 35 | * @param fe Frontend to attach to. |
| 36 | * @param pll_addr i2c address of the PLL (if used). |
| 37 | * @param i2c i2c adapter to use (set to NULL if not used). |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 38 | * @param pll_desc_id dvb_pll_desc to use. |
Andrew de Quincey | 2bfe031 | 2006-08-08 09:10:08 -0300 | [diff] [blame] | 39 | * @return Frontend pointer on success, NULL on failure |
Andrew de Quincey | 272bc4d | 2006-04-18 17:47:12 -0300 | [diff] [blame] | 40 | */ |
Peter Senna Tschudin | 7b34be7 | 2013-01-20 01:32:56 -0300 | [diff] [blame] | 41 | #if IS_ENABLED(CONFIG_DVB_PLL) |
Michael Krufky | 47ae9ae | 2006-11-20 16:38:42 -0300 | [diff] [blame] | 42 | extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, |
| 43 | int pll_addr, |
| 44 | struct i2c_adapter *i2c, |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 45 | unsigned int pll_desc_id); |
Trent Piepho | 9ab1ba3 | 2007-04-27 12:31:28 -0300 | [diff] [blame] | 46 | #else |
| 47 | static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, |
| 48 | int pll_addr, |
| 49 | struct i2c_adapter *i2c, |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 50 | unsigned int pll_desc_id) |
Trent Piepho | 9ab1ba3 | 2007-04-27 12:31:28 -0300 | [diff] [blame] | 51 | { |
Harvey Harrison | 271ddbf | 2008-04-08 23:20:00 -0300 | [diff] [blame] | 52 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); |
Trent Piepho | 9ab1ba3 | 2007-04-27 12:31:28 -0300 | [diff] [blame] | 53 | return NULL; |
| 54 | } |
| 55 | #endif |
Andrew de Quincey | 272bc4d | 2006-04-18 17:47:12 -0300 | [diff] [blame] | 56 | |
Johannes Stezenbach | 5e9e722 | 2005-05-16 21:54:37 -0700 | [diff] [blame] | 57 | #endif |