blob: 6aaa9c6bff9c253122c9b4d43b4fde449db7765e [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Johannes Stezenbach776338e2005-06-23 22:02:35 -07003 * descriptions + helper functions for simple dvb plls.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 */
5
Johannes Stezenbach5e9e7222005-05-16 21:54:37 -07006#ifndef __DVB_PLL_H__
7#define __DVB_PLL_H__
8
Andrew de Quincey272bc4d2006-04-18 17:47:12 -03009#include <linux/i2c.h>
10#include "dvb_frontend.h"
11
Michael Krufky47a99912007-06-12 16:10:51 -030012#define DVB_PLL_UNDEFINED 0
13#define DVB_PLL_THOMSON_DTT7579 1
14#define DVB_PLL_THOMSON_DTT759X 2
Michael Krufkyb6fd549e2008-04-22 14:46:20 -030015#define DVB_PLL_LG_Z201 3
16#define DVB_PLL_UNKNOWN_1 4
17#define DVB_PLL_TUA6010XS 5
18#define DVB_PLL_ENV57H1XD5 6
19#define DVB_PLL_TUA6034 7
20#define DVB_PLL_TDA665X 8
21#define DVB_PLL_TDED4 9
22#define DVB_PLL_TDHU2 10
23#define DVB_PLL_SAMSUNG_TBMV 11
24#define DVB_PLL_PHILIPS_SD1878_TDA8261 12
25#define DVB_PLL_OPERA1 13
Antti Palosaari139dfeb2008-05-17 23:02:00 -030026#define DVB_PLL_SAMSUNG_DTOS403IH102A 14
Trent Piephoa104ed02009-06-11 19:21:34 -030027#define DVB_PLL_SAMSUNG_TDTC9251DH0 15
Trent Piephof52c4852009-06-11 19:21:34 -030028#define DVB_PLL_SAMSUNG_TBDU18132 16
Trent Piepho9d5d75a2009-06-11 19:21:34 -030029#define DVB_PLL_SAMSUNG_TBMU24112 17
Trent Piephod799ce52009-06-11 19:24:00 -030030#define DVB_PLL_TDEE4 18
Patrice Chotard5fb67072012-07-31 15:31:20 -030031#define DVB_PLL_THOMSON_DTT7520X 19
Chris Pascoe780dfef2006-02-28 08:34:59 -030032
Andrew de Quincey272bc4d2006-04-18 17:47:12 -030033/**
34 * Attach a dvb-pll to the supplied frontend structure.
35 *
36 * @param fe Frontend to attach to.
37 * @param pll_addr i2c address of the PLL (if used).
38 * @param i2c i2c adapter to use (set to NULL if not used).
Michael Krufky47a99912007-06-12 16:10:51 -030039 * @param pll_desc_id dvb_pll_desc to use.
Andrew de Quincey2bfe0312006-08-08 09:10:08 -030040 * @return Frontend pointer on success, NULL on failure
Andrew de Quincey272bc4d2006-04-18 17:47:12 -030041 */
Arnd Bergmann9b174522015-02-18 14:12:42 -030042#if IS_REACHABLE(CONFIG_DVB_PLL)
Michael Krufky47ae9ae2006-11-20 16:38:42 -030043extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
44 int pll_addr,
45 struct i2c_adapter *i2c,
Michael Krufky47a99912007-06-12 16:10:51 -030046 unsigned int pll_desc_id);
Trent Piepho9ab1ba32007-04-27 12:31:28 -030047#else
48static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe,
49 int pll_addr,
50 struct i2c_adapter *i2c,
Michael Krufky47a99912007-06-12 16:10:51 -030051 unsigned int pll_desc_id)
Trent Piepho9ab1ba32007-04-27 12:31:28 -030052{
Harvey Harrison271ddbf2008-04-08 23:20:00 -030053 printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
Trent Piepho9ab1ba32007-04-27 12:31:28 -030054 return NULL;
55}
56#endif
Andrew de Quincey272bc4d2006-04-18 17:47:12 -030057
Johannes Stezenbach5e9e7222005-05-16 21:54:37 -070058#endif