Merge branch 'work.regset' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux/fpc-iii.git] / drivers / media / tuners / si2157_priv.h
blobef479609893149aedc4fea4fe1ed4302ff10b3bb
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Silicon Labs Si2146/2147/2148/2157/2158 silicon tuner driver
5 * Copyright (C) 2014 Antti Palosaari <crope@iki.fi>
6 */
8 #ifndef SI2157_PRIV_H
9 #define SI2157_PRIV_H
11 #include <linux/firmware.h>
12 #include <media/v4l2-mc.h>
13 #include "si2157.h"
15 enum si2157_pads {
16 SI2157_PAD_RF_INPUT,
17 SI2157_PAD_VID_OUT,
18 SI2157_PAD_AUD_OUT,
19 SI2157_NUM_PADS
22 /* state struct */
23 struct si2157_dev {
24 struct mutex i2c_mutex;
25 struct dvb_frontend *fe;
26 unsigned int active:1;
27 unsigned int inversion:1;
28 unsigned int dont_load_firmware:1;
29 u8 chiptype;
30 u8 if_port;
31 u32 if_frequency;
32 u32 bandwidth;
33 u32 frequency;
34 struct delayed_work stat_work;
36 #if defined(CONFIG_MEDIA_CONTROLLER)
37 struct media_device *mdev;
38 struct media_entity ent;
39 struct media_pad pad[SI2157_NUM_PADS];
40 #endif
44 #define SI2157_CHIPTYPE_SI2157 0
45 #define SI2157_CHIPTYPE_SI2146 1
46 #define SI2157_CHIPTYPE_SI2141 2
47 #define SI2157_CHIPTYPE_SI2177 3
49 /* firmware command struct */
50 #define SI2157_ARGLEN 30
51 struct si2157_cmd {
52 u8 args[SI2157_ARGLEN];
53 unsigned wlen;
54 unsigned rlen;
57 #define SI2158_A20_FIRMWARE "dvb-tuner-si2158-a20-01.fw"
58 #define SI2141_A10_FIRMWARE "dvb-tuner-si2141-a10-01.fw"
59 #define SI2157_A30_FIRMWARE "dvb-tuner-si2157-a30-01.fw"
60 #endif