From patchwork Mon May 9 18:28:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 6557 Return-path: Envelope-to: mchehab@gaivota Delivery-date: Mon, 09 May 2011 20:30:30 +0200 Received: from mchehab by gaivota with local (Exim 4.73) (envelope-from ) id 1QJVDy-00015k-To for mchehab@gaivota; Mon, 09 May 2011 20:30:30 +0200 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.19) for (single-drop); Mon, 09 May 2011 20:30:30 +0200 (CEST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1QJVC9-0007zG-Qx; Mon, 09 May 2011 18:28:38 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753083Ab1EIS20 (ORCPT + 1 other); Mon, 9 May 2011 14:28:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33710 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752016Ab1EIS20 (ORCPT ); Mon, 9 May 2011 14:28:26 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p49ISPAx018034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 May 2011 14:28:25 -0400 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p49ISOMm008880; Mon, 9 May 2011 14:28:24 -0400 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: Jarod Wilson , =?UTF-8?q?Juan=20Jes=C3=BAs=20Garc=C3=ADa=20de=20Soria?= Subject: [PATCH v2] [media] ite-cir: make IR receive work after resume Date: Mon, 9 May 2011 14:28:21 -0400 Message-Id: <1304965701-24912-1-git-send-email-jarod@redhat.com> In-Reply-To: <1304953686-21805-1-git-send-email-jarod@redhat.com> References: <1304953686-21805-1-git-send-email-jarod@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab Just recently acquired an Asus Eee Box PC with an onboard IR receiver driven by ite-cir (ITE8713 sub-variant). Works out of the box with the ite-cir driver in 2.6.39, but stops working after a suspend/resume cycle. Its fixed by simply reinitializing registers after resume, similar to what's done in the nuvoton-cir driver. I've not tested with any other ITE variant, but code inspection suggests this should be safe on all variants. Reported-by: Stephan Raue CC: Juan Jesús García de Soria Signed-off-by: Jarod Wilson --- v2: fix copy/paste thinko drivers/media/rc/ite-cir.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 43908a7..253837e 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c @@ -1684,6 +1684,8 @@ static int ite_resume(struct pnp_dev *pdev) /* wake up the transmitter */ wake_up_interruptible(&dev->tx_queue); } else { + /* reinitialize hardware config registers */ + dev->params.init_hardware(dev); /* enable the receiver */ dev->params.enable_rx(dev); }