blob: f4b5a0601c3aa79dd443a2b0b191986f1ef05723 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Johannes Stezenbach776338e2005-06-23 22:02:35 -07002 * descriptions + helper functions for simple dvb plls.
Linus Torvalds1da177e2005-04-16 15:20:36 -07003 */
4
Johannes Stezenbach5e9e7222005-05-16 21:54:37 -07005#ifndef __DVB_PLL_H__
6#define __DVB_PLL_H__
7
Andrew de Quincey272bc4d2006-04-18 17:47:12 -03008#include <linux/i2c.h>
9#include "dvb_frontend.h"
10
Michael Krufky47a99912007-06-12 16:10:51 -030011#define DVB_PLL_UNDEFINED 0
12#define DVB_PLL_THOMSON_DTT7579 1
13#define DVB_PLL_THOMSON_DTT759X 2
Michael Krufkyb6fd549e2008-04-22 14:46:20 -030014#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 Palosaari139dfeb2008-05-17 23:02:00 -030025#define DVB_PLL_SAMSUNG_DTOS403IH102A 14
Trent Piephoa104ed02009-06-11 19:21:34 -030026#define DVB_PLL_SAMSUNG_TDTC9251DH0 15
Trent Piephof52c4852009-06-11 19:21:34 -030027#define DVB_PLL_SAMSUNG_TBDU18132 16
Trent Piepho9d5d75a2009-06-11 19:21:34 -030028#define DVB_PLL_SAMSUNG_TBMU24112 17
Trent Piephod799ce52009-06-11 19:24:00 -030029#define DVB_PLL_TDEE4 18
Patrice Chotard5fb67072012-07-31 15:31:20 -030030#define DVB_PLL_THOMSON_DTT7520X 19
Chris Pascoe780dfef2006-02-28 08:34:59 -030031
Andrew de Quincey272bc4d2006-04-18 17:47:12 -030032/**
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 Krufky47a99912007-06-12 16:10:51 -030038 * @param pll_desc_id dvb_pll_desc to use.
Andrew de Quincey2bfe0312006-08-08 09:10:08 -030039 * @return Frontend pointer on success, NULL on failure
Andrew de Quincey272bc4d2006-04-18 17:47:12 -030040 */
Peter Senna Tschudin7b34be72013-01-20 01:32:56 -030041#if IS_ENABLED(CONFIG_DVB_PLL)
Michael Krufky47ae9ae2006-11-20 16:38:42 -030042extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
43 int pll_addr,
44 struct i2c_adapter *i2c,
Michael Krufky47a99912007-06-12 16:10:51 -030045 unsigned int pll_desc_id);
Trent Piepho9ab1ba32007-04-27 12:31:28 -030046#else
47static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
48 int pll_addr,
49 struct i2c_adapter *i2c,
Michael Krufky47a99912007-06-12 16:10:51 -030050 unsigned int pll_desc_id)
Trent Piepho9ab1ba32007-04-27 12:31:28 -030051{
Harvey Harrison271ddbf2008-04-08 23:20:00 -030052 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
Trent Piepho9ab1ba32007-04-27 12:31:28 -030053 return NULL;
54}
55#endif
Andrew de Quincey272bc4d2006-04-18 17:47:12 -030056
Johannes Stezenbach5e9e7222005-05-16 21:54:37 -070057#endif