From patchwork Thu Aug 7 16:10:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 4691961 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 76E9EC0338 for ; Thu, 7 Aug 2014 16:10:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 77D2E20114 for ; Thu, 7 Aug 2014 16:10:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A3B8B20109 for ; Thu, 7 Aug 2014 16:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932556AbaHGQKf (ORCPT ); Thu, 7 Aug 2014 12:10:35 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:35401 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932380AbaHGQKe (ORCPT ); Thu, 7 Aug 2014 12:10:34 -0400 Received: from [187.57.189.12] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1XFQGt-0008VS-Uf; Thu, 07 Aug 2014 16:10:32 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1XFQGq-0003MW-1e; Thu, 07 Aug 2014 13:10:28 -0300 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 2/3] au0828: add an option to disable IR via modprobe parameter Date: Thu, 7 Aug 2014 13:10:25 -0300 Message-Id: <1407427826-12886-2-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1407427826-12886-1-git-send-email-m.chehab@samsung.com> References: <1407427826-12886-1-git-send-email-m.chehab@samsung.com> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The IR code increases the power consumption of the device. Allow to disable it via modprobe parameter. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/au0828/au0828-input.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/au0828/au0828-input.c b/drivers/media/usb/au0828/au0828-input.c index 53d2c59355f2..94d29c2a6fcf 100644 --- a/drivers/media/usb/au0828/au0828-input.c +++ b/drivers/media/usb/au0828/au0828-input.c @@ -25,6 +25,10 @@ #include #include +static int disable_ir; +module_param(disable_ir, int, 0444); +MODULE_PARM_DESC(disable_ir, "disable infrared remote support"); + #include "au0828.h" struct au0828_rc { @@ -274,7 +278,7 @@ int au0828_rc_register(struct au0828_dev *dev) int err = -ENOMEM; u16 i2c_rc_dev_addr = 0; - if (!dev->board.has_ir_i2c) + if (!dev->board.has_ir_i2c || disable_ir) return 0; i2c_rc_dev_addr = au0828_probe_i2c_ir(dev);