Path: blob/master/drivers/media/common/tuners/qt1010_priv.h
15112 views
/*1* Driver for Quantek QT1010 silicon tuner2*3* Copyright (C) 2006 Antti Palosaari <[email protected]>4* Aapo Tahkola <[email protected]>5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License as published by8* the Free Software Foundation; either version 2 of the License, or9* (at your option) any later version.10*11* This program is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14* GNU General Public License for more details.15*16* You should have received a copy of the GNU General Public License17* along with this program; if not, write to the Free Software18* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.19*/2021#ifndef QT1010_PRIV_H22#define QT1010_PRIV_H2324/*25reg def meaning26=== === =======2700 00 ?2801 a0 ? operation start/stop; start=80, stop=002902 00 ?3003 19 ?3104 00 ?3205 00 ? maybe band selection3306 00 ?3407 2b set frequency: 32 MHz scale, n*32 MHz3508 0b ?3609 10 ? changes every 8/24 MHz; values 1d/1c370a 08 set frequency: 4 MHz scale, n*4 MHz380b 41 ? changes every 2/2 MHz; values 45/45390c e1 ?400d 94 ?410e b6 ?420f 2c ?4310 10 ?4411 f1 ? maybe device specified adjustment4512 11 ? maybe device specified adjustment4613 3f ?4714 1f ?4815 3f ?4916 ff ?5017 ff ?5118 f7 ?5219 80 ?531a d0 set frequency: 125 kHz scale, n*125 kHz541b 00 ?551c 89 ?561d 00 ?571e 00 ? looks like operation register; write cmd here, read result from 1f-26581f 20 ? chip initialization5920 e0 ? chip initialization6021 20 ?6122 d0 ?6223 d0 ?6324 d0 ?6425 40 ? chip initialization6526 08 ?6627 29 ?6728 55 ?6829 39 ?692a 13 ?702b 01 ?712c ea ?722d 00 ?732e 00 ? not used?742f 00 ? not used?75*/7677#define QT1010_STEP 125000 /* 125 kHz used by Windows drivers,78hw could be more precise but we don't79know how to use */80#define QT1010_MIN_FREQ 48000000 /* 48 MHz */81#define QT1010_MAX_FREQ 860000000 /* 860 MHz */82#define QT1010_OFFSET 1246000000 /* 1246 MHz */8384#define QT1010_WR 085#define QT1010_RD 186#define QT1010_M1 38788typedef struct {89u8 oper, reg, val;90} qt1010_i2c_oper_t;9192struct qt1010_priv {93struct qt1010_config *cfg;94struct i2c_adapter *i2c;9596u8 reg1f_init_val;97u8 reg20_init_val;98u8 reg25_init_val;99100u32 frequency;101u32 bandwidth;102};103104#endif105106107