[media] mceusb: add support for Conexant Hybrid TV RDU253S

Another multi-function Conexant device. Interface 0 is IR, though on
this model, TX isn't wired up at all, so I've mixed in support for
models without TX (and verified that lircd says TX isn't supported when
trying to send w/this device).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by Jarod Wilson and committed by Mauro Carvalho Chehab 6f6c625d 798174ab

+27 -10
+27 -10
drivers/media/IR/mceusb.c
··· 146 146 MCE_GEN3, 147 147 MCE_GEN2_TX_INV, 148 148 POLARIS_EVK, 149 + CX_HYBRID_TV, 149 150 }; 150 151 151 152 struct mceusb_model { ··· 155 154 u32 mce_gen3:1; 156 155 u32 tx_mask_inverted:1; 157 156 u32 is_polaris:1; 157 + u32 no_tx:1; 158 158 159 159 const char *rc_map; /* Allow specify a per-board map */ 160 160 const char *name; /* per-board name */ ··· 185 183 * to allow testing it 186 184 */ 187 185 .rc_map = RC_MAP_RC5_HAUPPAUGE_NEW, 188 - .name = "cx231xx MCE IR", 186 + .name = "Conexant Hybrid TV (cx231xx) MCE IR", 187 + }, 188 + [CX_HYBRID_TV] = { 189 + .is_polaris = 1, 190 + .no_tx = 1, /* tx isn't wired up at all */ 191 + .name = "Conexant Hybrid TV (cx231xx) MCE IR", 189 192 }, 190 193 }; 191 194 ··· 299 292 { USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) }, 300 293 /* TiVo PC IR Receiver */ 301 294 { USB_DEVICE(VENDOR_TIVO, 0x2000) }, 302 - /* Conexant SDK */ 295 + /* Conexant Hybrid TV "Shelby" Polaris SDK */ 303 296 { USB_DEVICE(VENDOR_CONEXANT, 0x58a1), 304 297 .driver_info = POLARIS_EVK }, 298 + /* Conexant Hybrid TV RDU253S Polaris */ 299 + { USB_DEVICE(VENDOR_CONEXANT, 0x58a5), 300 + .driver_info = CX_HYBRID_TV }, 305 301 /* Terminating entry */ 306 302 { } 307 303 }; ··· 344 334 u32 connected:1; 345 335 u32 tx_mask_inverted:1; 346 336 u32 microsoft_gen1:1; 337 + u32 no_tx:1; 347 338 } flags; 348 339 349 340 /* transmit support */ ··· 735 724 return ret ? ret : n; 736 725 } 737 726 738 - /* Sets active IR outputs -- mce devices typically (all?) have two */ 727 + /* Sets active IR outputs -- mce devices typically have two */ 739 728 static int mceusb_set_tx_mask(void *priv, u32 mask) 740 729 { 741 730 struct mceusb_dev *ir = priv; ··· 995 984 mce_async_out(ir, GET_CARRIER_FREQ, sizeof(GET_CARRIER_FREQ)); 996 985 mce_sync_in(ir, NULL, maxp); 997 986 998 - /* get the transmitter bitmask */ 999 - mce_async_out(ir, GET_TX_BITMASK, sizeof(GET_TX_BITMASK)); 1000 - mce_sync_in(ir, NULL, maxp); 987 + if (!ir->flags.no_tx) { 988 + /* get the transmitter bitmask */ 989 + mce_async_out(ir, GET_TX_BITMASK, sizeof(GET_TX_BITMASK)); 990 + mce_sync_in(ir, NULL, maxp); 991 + } 1001 992 1002 993 /* get receiver timeout value */ 1003 994 mce_async_out(ir, GET_RX_TIMEOUT, sizeof(GET_RX_TIMEOUT)); ··· 1048 1035 props->priv = ir; 1049 1036 props->driver_type = RC_DRIVER_IR_RAW; 1050 1037 props->allowed_protos = IR_TYPE_ALL; 1051 - props->s_tx_mask = mceusb_set_tx_mask; 1052 - props->s_tx_carrier = mceusb_set_tx_carrier; 1053 - props->tx_ir = mceusb_tx_ir; 1038 + if (!ir->flags.no_tx) { 1039 + props->s_tx_mask = mceusb_set_tx_mask; 1040 + props->s_tx_carrier = mceusb_set_tx_carrier; 1041 + props->tx_ir = mceusb_tx_ir; 1042 + } 1054 1043 1055 1044 ir->props = props; 1056 1045 ··· 1166 1151 ir->len_in = maxp; 1167 1152 ir->flags.microsoft_gen1 = is_microsoft_gen1; 1168 1153 ir->flags.tx_mask_inverted = tx_mask_inverted; 1154 + ir->flags.no_tx = mceusb_model[model].no_tx; 1169 1155 ir->model = model; 1170 1156 1171 1157 init_ir_raw_event(&ir->rawir); ··· 1207 1191 1208 1192 mceusb_get_parameters(ir); 1209 1193 1210 - mceusb_set_tx_mask(ir, MCE_DEFAULT_TX_MASK); 1194 + if (!ir->flags.no_tx) 1195 + mceusb_set_tx_mask(ir, MCE_DEFAULT_TX_MASK); 1211 1196 1212 1197 usb_set_intfdata(intf, ir); 1213 1198