aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/mceusb.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2011-07-18 15:54:27 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-08-27 07:55:33 -0400
commitb71969bee23ea0c44c594e5027ba26029d27afea (patch)
tree4fcd8fc72ab029d69fe68a13006ba497e27d4606 /drivers/media/rc/mceusb.c
parenta411e83944bc48ce274b1bafdb6929846815856c (diff)
[media] mceusb: flash LED (emu v2+ only) to signal end of init
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/mceusb.c')
-rw-r--r--drivers/media/rc/mceusb.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
index c4f3bc00611d..8fa5a725bed7 100644
--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -451,6 +451,7 @@ static char DEVICE_RESUME[] = {MCE_CMD_NULL, MCE_CMD_PORT_SYS,
451static char GET_REVISION[] = {MCE_CMD_PORT_SYS, MCE_CMD_G_REVISION}; 451static char GET_REVISION[] = {MCE_CMD_PORT_SYS, MCE_CMD_G_REVISION};
452static char GET_EMVER[] = {MCE_CMD_PORT_SYS, MCE_CMD_GETEMVER}; 452static char GET_EMVER[] = {MCE_CMD_PORT_SYS, MCE_CMD_GETEMVER};
453static char GET_WAKEVERSION[] = {MCE_CMD_PORT_SYS, MCE_CMD_GETWAKEVERSION}; 453static char GET_WAKEVERSION[] = {MCE_CMD_PORT_SYS, MCE_CMD_GETWAKEVERSION};
454static char FLASH_LED[] = {MCE_CMD_PORT_SYS, MCE_CMD_FLASHLED};
454static char GET_UNKNOWN2[] = {MCE_CMD_PORT_IR, MCE_CMD_UNKNOWN2}; 455static char GET_UNKNOWN2[] = {MCE_CMD_PORT_IR, MCE_CMD_UNKNOWN2};
455static char GET_CARRIER_FREQ[] = {MCE_CMD_PORT_IR, MCE_CMD_GETIRCFS}; 456static char GET_CARRIER_FREQ[] = {MCE_CMD_PORT_IR, MCE_CMD_GETIRCFS};
456static char GET_RX_TIMEOUT[] = {MCE_CMD_PORT_IR, MCE_CMD_GETIRTIMEOUT}; 457static char GET_RX_TIMEOUT[] = {MCE_CMD_PORT_IR, MCE_CMD_GETIRTIMEOUT};
@@ -591,6 +592,9 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
591 dev_info(dev, "TX port %d: blaster is%s connected\n", 592 dev_info(dev, "TX port %d: blaster is%s connected\n",
592 data1 + 1, data4 ? " not" : ""); 593 data1 + 1, data4 ? " not" : "");
593 break; 594 break;
595 case MCE_CMD_FLASHLED:
596 dev_info(dev, "Attempting to flash LED\n");
597 break;
594 default: 598 default:
595 dev_info(dev, "Unknown command 0x%02x 0x%02x\n", 599 dev_info(dev, "Unknown command 0x%02x 0x%02x\n",
596 cmd, subcmd); 600 cmd, subcmd);
@@ -1163,6 +1167,14 @@ static void mceusb_get_parameters(struct mceusb_dev *ir)
1163 } 1167 }
1164} 1168}
1165 1169
1170static void mceusb_flash_led(struct mceusb_dev *ir)
1171{
1172 if (ir->emver < 2)
1173 return;
1174
1175 mce_async_out(ir, FLASH_LED, sizeof(FLASH_LED));
1176}
1177
1166static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir) 1178static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir)
1167{ 1179{
1168 struct device *dev = ir->dev; 1180 struct device *dev = ir->dev;
@@ -1345,6 +1357,8 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
1345 1357
1346 mceusb_get_parameters(ir); 1358 mceusb_get_parameters(ir);
1347 1359
1360 mceusb_flash_led(ir);
1361
1348 if (!ir->flags.no_tx) 1362 if (!ir->flags.no_tx)
1349 mceusb_set_tx_mask(ir->rc, MCE_DEFAULT_TX_MASK); 1363 mceusb_set_tx_mask(ir->rc, MCE_DEFAULT_TX_MASK);
1350 1364