From patchwork Thu Jul 14 22:09:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 976702 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6EMAJIr024747 for ; Thu, 14 Jul 2011 22:10:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932310Ab1GNWKH (ORCPT ); Thu, 14 Jul 2011 18:10:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38375 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754585Ab1GNWKG (ORCPT ); Thu, 14 Jul 2011 18:10:06 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6EMA54s024729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 14 Jul 2011 18:10:05 -0400 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6EM9u6M011180; Thu, 14 Jul 2011 18:10:04 -0400 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: Jarod Wilson Subject: [PATCH 7/9] [media] mceusb: flash LED (emu v2+ only) to signal end of init Date: Thu, 14 Jul 2011 18:09:52 -0400 Message-Id: <1310681394-3530-8-git-send-email-jarod@redhat.com> In-Reply-To: <1310681394-3530-1-git-send-email-jarod@redhat.com> References: <1310681394-3530-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 14 Jul 2011 22:10:20 +0000 (UTC) Signed-off-by: Jarod Wilson --- drivers/media/rc/mceusb.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index e4171f7..bbd79c0 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -452,6 +452,7 @@ static char DEVICE_RESUME[] = {MCE_CMD_NULL, MCE_CMD_PORT_SYS, static char GET_REVISION[] = {MCE_CMD_PORT_SYS, MCE_CMD_G_REVISION}; static char GET_EMVER[] = {MCE_CMD_PORT_SYS, MCE_CMD_GETEMVER}; static char GET_WAKEVERSION[] = {MCE_CMD_PORT_SYS, MCE_CMD_GETWAKEVERSION}; +static char FLASH_LED[] = {MCE_CMD_PORT_SYS, MCE_CMD_FLASHLED}; static char GET_UNKNOWN2[] = {MCE_CMD_PORT_IR, MCE_CMD_UNKNOWN2}; static char GET_CARRIER_FREQ[] = {MCE_CMD_PORT_IR, MCE_CMD_GETIRCFS}; static char GET_RX_TIMEOUT[] = {MCE_CMD_PORT_IR, MCE_CMD_GETIRTIMEOUT}; @@ -592,6 +593,9 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf, dev_info(dev, "TX port %d: blaster is%s connected\n", data1 + 1, data4 ? " not" : ""); break; + case MCE_CMD_FLASHLED: + dev_info(dev, "Attempting to flash LED\n"); + break; default: dev_info(dev, "Unknown command 0x%02x 0x%02x\n", cmd, subcmd); @@ -1166,6 +1170,14 @@ static void mceusb_get_parameters(struct mceusb_dev *ir) } } +static void mceusb_flash_led(struct mceusb_dev *ir) +{ + if (ir->emver < 2) + return; + + mce_async_out(ir, FLASH_LED, sizeof(FLASH_LED)); +} + static struct rc_dev *mceusb_init_rc_dev(struct mceusb_dev *ir) { struct device *dev = ir->dev; @@ -1343,6 +1355,8 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, mceusb_get_parameters(ir); + mceusb_flash_led(ir); + if (ir->num_txports && !ir->flags.no_tx) { ir->rc->s_tx_mask = mceusb_set_tx_mask; ir->rc->s_tx_carrier = mceusb_set_tx_carrier;