From patchwork Mon Mar 12 21:48:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 10277541 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9E7D4602C2 for ; Mon, 12 Mar 2018 21:49:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CFF328E58 for ; Mon, 12 Mar 2018 21:49:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 818D228E68; Mon, 12 Mar 2018 21:49:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A9F828E58 for ; Mon, 12 Mar 2018 21:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4lOBYSBEG5uA5WHZAOQcAhrQNltrQOyvFsq5CM/lTNw=; b=MKs7F//bmnHjHx Zns5szdcLdO62qcoUSGWKAedZ+hMDfpe2QhgXPzufjyE05oi8tKa3RVUqD5jMDaebcZ8JYGcc2FW+ bDzwVIy3l62K0cE8gSwkLSHjhkK6kTECp0iDkEW19h9jbkXtx9tYFl9+NjhLSKZF3mQRRCQE5kGpi Km2LVYoI8sUCS2EMZxZD4Q1xE3RRutjvV8SUYRwN92AULTFiNzK6JXdF1T67j0YKVA6yLgxnqf1Cw tTt9762ii6pOI1T/wkmFPLJ2I9/d032yyUEVuXVKQwUgM6Ah9l+tAz4UbaS5+uUeWV4DipU97YPiE aNUmniUnwKaueWfAUmTg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1evVJT-0003TT-8y; Mon, 12 Mar 2018 21:48:59 +0000 Received: from gofer.mess.org ([2a02:8011:d000:212::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1evVJP-0003P0-Hl for linux-amlogic@lists.infradead.org; Mon, 12 Mar 2018 21:48:57 +0000 Received: by gofer.mess.org (Postfix, from userid 1000) id 05B76601C8; Mon, 12 Mar 2018 21:48:40 +0000 (GMT) Date: Mon, 12 Mar 2018 21:48:40 +0000 From: Sean Young To: Matthias Reichl Subject: [PATCH] media: rc: meson-ir: lower timeout and make configurable Message-ID: <20180312214840.rnuflajm6n6kozxt@gofer.mess.org> References: <20180306174122.6017-1-hias@horus.com> <20180308164327.ihhmvm6ntzvnsjy7@gofer.mess.org> <20180309155451.gbocsaj4s3puc4cq@camel2.lan> <20180310112744.plfxkmqbgvii7n7r@gofer.mess.org> <20180310173828.7lwyicxzar22dyb7@camel2.lan> <20180311125518.pcob4wii43odmana@gofer.mess.org> <20180312132000.oqrj4xjdi7lvupnu@camel2.lan> <20180312135811.g25jjzhmh3jnvgjr@gofer.mess.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180312135811.g25jjzhmh3jnvgjr@gofer.mess.org> User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180312_144855_753623_473E2601 X-CRM114-Status: GOOD ( 10.16 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Kevin Hilman , Jonas Karlman , linux-media@vger.kernel.org, Carlo Caione , linux-amlogic@lists.infradead.org, Mauro Carvalho Chehab , Alex Deryskyba , Heiner Kallweit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP A timeout of 200ms is much longer than necessary, and delays the decoding decoding of a single scancode and the last scancode when a button is being held. This makes the remote seem sluggish. If the min_timeout and max_timeout values are set, the timeout is configurable via the LIRC_SET_REC_TIMEOUT ioctl. Signed-off-by: Sean Young Tested-by: Matthias Reichl --- drivers/media/rc/meson-ir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c index 64b0aa4f4db7..f449b35d25e7 100644 --- a/drivers/media/rc/meson-ir.c +++ b/drivers/media/rc/meson-ir.c @@ -144,7 +144,9 @@ static int meson_ir_probe(struct platform_device *pdev) ir->rc->map_name = map_name ? map_name : RC_MAP_EMPTY; ir->rc->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER; ir->rc->rx_resolution = US_TO_NS(MESON_TRATE); - ir->rc->timeout = MS_TO_NS(200); + ir->rc->min_timeout = 1; + ir->rc->timeout = IR_DEFAULT_TIMEOUT; + ir->rc->max_timeout = 10 * IR_DEFAULT_TIMEOUT; ir->rc->driver_name = DRIVER_NAME; spin_lock_init(&ir->lock);