1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Card-specific functions for the Siano SMS1xxx USB dongle
5 * Copyright (c) 2008 Michael Krufky <mkrufky@linuxtv.org>
8 #ifndef __SMS_CARDS_H__
9 #define __SMS_CARDS_H__
11 #include "smscoreapi.h"
13 #include <linux/usb.h>
16 #define SMS_BOARD_UNKNOWN 0
17 #define SMS1XXX_BOARD_SIANO_STELLAR 1
18 #define SMS1XXX_BOARD_SIANO_NOVA_A 2
19 #define SMS1XXX_BOARD_SIANO_NOVA_B 3
20 #define SMS1XXX_BOARD_SIANO_VEGA 4
21 #define SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT 5
22 #define SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A 6
23 #define SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B 7
24 #define SMS1XXX_BOARD_HAUPPAUGE_WINDHAM 8
25 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD 9
26 #define SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2 10
27 #define SMS1XXX_BOARD_SIANO_NICE 11
28 #define SMS1XXX_BOARD_SIANO_VENICE 12
29 #define SMS1XXX_BOARD_SIANO_STELLAR_ROM 13
30 #define SMS1XXX_BOARD_ZTE_DVB_DATA_CARD 14
31 #define SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD 15
32 #define SMS1XXX_BOARD_SIANO_MING 16
33 #define SMS1XXX_BOARD_SIANO_PELE 17
34 #define SMS1XXX_BOARD_SIANO_RIO 18
35 #define SMS1XXX_BOARD_SIANO_DENVER_1530 19
36 #define SMS1XXX_BOARD_SIANO_DENVER_2160 20
37 #define SMS1XXX_BOARD_PCTV_77E 21
39 struct sms_board_gpio_cfg
{
48 int foreign_lna0_ctrl
;
49 int foreign_lna1_ctrl
;
50 int foreign_lna2_ctrl
;
64 int mrc_gp0
; /* mrcs spi int */
69 int host_spi_gsp_ts_int
;
73 enum sms_device_type_st type
;
74 char *name
, *fw
[DEVICE_MODE_MAX
];
75 struct sms_board_gpio_cfg board_cfg
;
76 char *rc_codes
; /* Name of IR codes table */
79 int led_power
, led_hi
, led_lo
, lna_ctrl
, rf_switch
;
85 struct sms_antenna_config_ST
*antenna_config
;
88 struct sms_board
*sms_get_board(unsigned id
);
90 extern struct smscore_device_t
*coredev
;
92 enum SMS_BOARD_EVENTS
{
93 BOARD_EVENT_POWER_INIT
,
94 BOARD_EVENT_POWER_SUSPEND
,
95 BOARD_EVENT_POWER_RESUME
,
97 BOARD_EVENT_SCAN_PROG
,
98 BOARD_EVENT_SCAN_COMP
,
99 BOARD_EVENT_EMERGENCY_WARNING_SIGNAL
,
101 BOARD_EVENT_FE_UNLOCK
,
102 BOARD_EVENT_DEMOD_LOCK
,
103 BOARD_EVENT_DEMOD_UNLOCK
,
104 BOARD_EVENT_RECEPTION_MAX_4
,
105 BOARD_EVENT_RECEPTION_3
,
106 BOARD_EVENT_RECEPTION_2
,
107 BOARD_EVENT_RECEPTION_1
,
108 BOARD_EVENT_RECEPTION_LOST_0
,
109 BOARD_EVENT_MULTIPLEX_OK
,
110 BOARD_EVENT_MULTIPLEX_ERRORS
113 int sms_board_event(struct smscore_device_t
*coredev
,
114 enum SMS_BOARD_EVENTS gevent
);
116 int sms_board_setup(struct smscore_device_t
*coredev
);
118 #define SMS_LED_OFF 0
121 int sms_board_led_feedback(struct smscore_device_t
*coredev
, int led
);
122 int sms_board_power(struct smscore_device_t
*coredev
, int onoff
);
123 int sms_board_lna_control(struct smscore_device_t
*coredev
, int onoff
);
125 extern int sms_board_load_modules(int id
);
127 #endif /* __SMS_CARDS_H__ */