Commit | Line | Data |
---|---|---|
1c11d546 MK |
1 | /* |
2 | * Card-specific functions for the Siano SMS1xxx USB dongle | |
3 | * | |
4 | * Copyright (c) 2008 Michael Krufky <mkrufky@linuxtv.org> | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or modify | |
09a29b77 | 7 | * it under the terms of the GNU General Public License version 2 as |
1c11d546 MK |
8 | * published by the Free Software Foundation; |
9 | * | |
10 | * Software distributed under the License is distributed on an "AS IS" | |
11 | * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. | |
12 | * | |
13 | * See the GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with this program; if not, write to the Free Software | |
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
18 | */ | |
19 | ||
20 | #ifndef __SMS_CARDS_H__ | |
21 | #define __SMS_CARDS_H__ | |
22 | ||
23 | #include <linux/usb.h> | |
24 | #include "smscoreapi.h" | |
90f944a3 | 25 | #include "smsir.h" |
1c11d546 MK |
26 | |
27 | #define SMS_BOARD_UNKNOWN 0 | |
cf1cfe1b MK |
28 | #define SMS1XXX_BOARD_SIANO_STELLAR 1 |
29 | #define SMS1XXX_BOARD_SIANO_NOVA_A 2 | |
30 | #define SMS1XXX_BOARD_SIANO_NOVA_B 3 | |
31 | #define SMS1XXX_BOARD_SIANO_VEGA 4 | |
44f71c3f MK |
32 | #define SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT 5 |
33 | #define SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A 6 | |
34 | #define SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B 7 | |
35 | #define SMS1XXX_BOARD_HAUPPAUGE_WINDHAM 8 | |
3f7d99f6 | 36 | #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD 9 |
dff65740 | 37 | #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 10 |
1c11d546 | 38 | |
3b2d18ef US |
39 | struct sms_board_gpio_cfg { |
40 | int lna_vhf_exist; | |
41 | int lna_vhf_ctrl; | |
42 | int lna_uhf_exist; | |
43 | int lna_uhf_ctrl; | |
44 | int lna_uhf_d_ctrl; | |
45 | int lna_sband_exist; | |
46 | int lna_sband_ctrl; | |
47 | int lna_sband_d_ctrl; | |
48 | int foreign_lna0_ctrl; | |
49 | int foreign_lna1_ctrl; | |
50 | int foreign_lna2_ctrl; | |
51 | int rf_switch_vhf; | |
52 | int rf_switch_uhf; | |
53 | int rf_switch_sband; | |
54 | int leds_power; | |
55 | int led0; | |
56 | int led1; | |
57 | int led2; | |
58 | int led3; | |
59 | int led4; | |
60 | int ir; | |
61 | int eeprom_wp; | |
62 | int mrc_sense; | |
63 | int mrc_pdn_resetn; | |
64 | int mrc_gp0; /* mrcs spi int */ | |
65 | int mrc_gp1; | |
66 | int mrc_gp2; | |
67 | int mrc_gp3; | |
68 | int mrc_gp4; | |
69 | int host_spi_gsp_ts_int; | |
70 | }; | |
71 | ||
1c11d546 | 72 | struct sms_board { |
1c11d546 | 73 | enum sms_device_type_st type; |
02aea4fb | 74 | char *name, *fw[DEVICE_MODE_MAX]; |
3b2d18ef | 75 | struct sms_board_gpio_cfg board_cfg; |
90f944a3 | 76 | enum ir_kb_type ir_kb_type; |
250fa674 MK |
77 | |
78 | /* gpios */ | |
d54093af | 79 | int led_power, led_hi, led_lo, lna_ctrl, rf_switch; |
1c11d546 MK |
80 | }; |
81 | ||
82 | struct sms_board *sms_get_board(int id); | |
83 | ||
90f944a3 US |
84 | extern struct smscore_device_t *coredev; |
85 | ||
250fa674 MK |
86 | int sms_board_setup(struct smscore_device_t *coredev); |
87 | ||
7b29e10d MK |
88 | #define SMS_LED_OFF 0 |
89 | #define SMS_LED_LO 1 | |
90 | #define SMS_LED_HI 2 | |
91 | int sms_board_led_feedback(struct smscore_device_t *coredev, int led); | |
7a6fbed6 | 92 | int sms_board_power(struct smscore_device_t *coredev, int onoff); |
d54093af | 93 | int sms_board_lna_control(struct smscore_device_t *coredev, int onoff); |
7a6fbed6 | 94 | |
05860f2d MK |
95 | extern int sms_board_load_modules(int id); |
96 | ||
1c11d546 | 97 | #endif /* __SMS_CARDS_H__ */ |