1ba92ae0fSAntti Palosaari /* 2*17ad09f1SCrazyCat * Silicon Labs Si2146/2147/2148/2157/2158 silicon tuner driver 3ba92ae0fSAntti Palosaari * 4ba92ae0fSAntti Palosaari * Copyright (C) 2014 Antti Palosaari <crope@iki.fi> 5ba92ae0fSAntti Palosaari * 6ba92ae0fSAntti Palosaari * This program is free software; you can redistribute it and/or modify 7ba92ae0fSAntti Palosaari * it under the terms of the GNU General Public License as published by 8ba92ae0fSAntti Palosaari * the Free Software Foundation; either version 2 of the License, or 9ba92ae0fSAntti Palosaari * (at your option) any later version. 10ba92ae0fSAntti Palosaari * 11ba92ae0fSAntti Palosaari * This program is distributed in the hope that it will be useful, 12ba92ae0fSAntti Palosaari * but WITHOUT ANY WARRANTY; without even the implied warranty of 13ba92ae0fSAntti Palosaari * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14ba92ae0fSAntti Palosaari * GNU General Public License for more details. 15ba92ae0fSAntti Palosaari */ 16ba92ae0fSAntti Palosaari 17930a8730SAntti Palosaari #ifndef SI2157_PRIV_H 18930a8730SAntti Palosaari #define SI2157_PRIV_H 19930a8730SAntti Palosaari 201b92373fSOlli Salonen #include <linux/firmware.h> 21930a8730SAntti Palosaari #include "si2157.h" 22930a8730SAntti Palosaari 23930a8730SAntti Palosaari /* state struct */ 24930a8730SAntti Palosaari struct si2157 { 25930a8730SAntti Palosaari struct mutex i2c_mutex; 26930a8730SAntti Palosaari struct i2c_client *client; 27930a8730SAntti Palosaari struct dvb_frontend *fe; 28930a8730SAntti Palosaari bool active; 294cbf6ed9SOlli Salonen bool fw_loaded; 3005024efeSMatthias Schwarzott bool inversion; 31073f3849SOlli Salonen u8 chiptype; 32930a8730SAntti Palosaari }; 33930a8730SAntti Palosaari 34073f3849SOlli Salonen #define SI2157_CHIPTYPE_SI2157 0 35073f3849SOlli Salonen #define SI2157_CHIPTYPE_SI2146 1 36073f3849SOlli Salonen 37073f3849SOlli Salonen /* firmware command struct */ 38930a8730SAntti Palosaari #define SI2157_ARGLEN 30 39930a8730SAntti Palosaari struct si2157_cmd { 40930a8730SAntti Palosaari u8 args[SI2157_ARGLEN]; 41e6b4380fSAntti Palosaari unsigned wlen; 42e6b4380fSAntti Palosaari unsigned rlen; 43930a8730SAntti Palosaari }; 44930a8730SAntti Palosaari 451b92373fSOlli Salonen #define SI2158_A20_FIRMWARE "dvb-tuner-si2158-a20-01.fw" 461b92373fSOlli Salonen 47930a8730SAntti Palosaari #endif 48