linux/drivers/media/tuners/qt1010_priv.h
<<
>>
Prefs
   1/*
   2 *  Driver for Quantek QT1010 silicon tuner
   3 *
   4 *  Copyright (C) 2006 Antti Palosaari <crope@iki.fi>
   5 *                     Aapo Tahkola <aet@rasterburn.org>
   6 *
   7 *  This program is free software; you can redistribute it and/or modify
   8 *  it under the terms of the GNU General Public License as published by
   9 *  the Free Software Foundation; either version 2 of the License, or
  10 *  (at your option) any later version.
  11 *
  12 *  This program is distributed in the hope that it will be useful,
  13 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15 *  GNU General Public License for more details.
  16 */
  17
  18#ifndef QT1010_PRIV_H
  19#define QT1010_PRIV_H
  20
  21/*
  22reg def meaning
  23=== === =======
  2400  00  ?
  2501  a0  ? operation start/stop; start=80, stop=00
  2602  00  ?
  2703  19  ?
  2804  00  ?
  2905  00  ? maybe band selection
  3006  00  ?
  3107  2b  set frequency: 32 MHz scale, n*32 MHz
  3208  0b  ?
  3309  10  ? changes every 8/24 MHz; values 1d/1c
  340a  08  set frequency: 4 MHz scale, n*4 MHz
  350b  41  ? changes every 2/2 MHz; values 45/45
  360c  e1  ?
  370d  94  ?
  380e  b6  ?
  390f  2c  ?
  4010  10  ?
  4111  f1  ? maybe device specified adjustment
  4212  11  ? maybe device specified adjustment
  4313  3f  ?
  4414  1f  ?
  4515  3f  ?
  4616  ff  ?
  4717  ff  ?
  4818  f7  ?
  4919  80  ?
  501a  d0  set frequency: 125 kHz scale, n*125 kHz
  511b  00  ?
  521c  89  ?
  531d  00  ?
  541e  00  ? looks like operation register; write cmd here, read result from 1f-26
  551f  20  ? chip initialization
  5620  e0  ? chip initialization
  5721  20  ?
  5822  d0  ?
  5923  d0  ?
  6024  d0  ?
  6125  40  ? chip initialization
  6226  08  ?
  6327  29  ?
  6428  55  ?
  6529  39  ?
  662a  13  ?
  672b  01  ?
  682c  ea  ?
  692d  00  ?
  702e  00  ? not used?
  712f  00  ? not used?
  72*/
  73
  74#define QT1010_STEP         125000 /*  125 kHz used by Windows drivers,
  75                                      hw could be more precise but we don't
  76                                      know how to use */
  77#define QT1010_MIN_FREQ   48000000 /*   48 MHz */
  78#define QT1010_MAX_FREQ  860000000 /*  860 MHz */
  79#define QT1010_OFFSET   1246000000 /* 1246 MHz */
  80
  81#define QT1010_WR 0
  82#define QT1010_RD 1
  83#define QT1010_M1 3
  84
  85typedef struct {
  86        u8 oper, reg, val;
  87} qt1010_i2c_oper_t;
  88
  89struct qt1010_priv {
  90        struct qt1010_config *cfg;
  91        struct i2c_adapter   *i2c;
  92
  93        u8 reg1f_init_val;
  94        u8 reg20_init_val;
  95        u8 reg25_init_val;
  96
  97        u32 frequency;
  98};
  99
 100#endif
 101