From patchwork Thu Nov 5 15:35:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Klein X-Patchwork-Id: 319609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E119C4741F for ; Thu, 5 Nov 2020 15:38:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5A5920867 for ; Thu, 5 Nov 2020 15:38:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fossekall.de header.i=@fossekall.de header.b="lur4dViT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731008AbgKEPi1 (ORCPT ); Thu, 5 Nov 2020 10:38:27 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.21]:17150 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730854AbgKEPi0 (ORCPT ); Thu, 5 Nov 2020 10:38:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1604590704; s=strato-dkim-0002; d=fossekall.de; h=In-Reply-To:References:Message-ID:Subject:To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=3/PcyM/l/9H+hlNAgtQDHAtlA4KPvhoQcMLvAC/QXUM=; b=lur4dViTnQBydGncHItV/+vjISaaduU0uUvtkVsu97P6ThiLMfaDVvF/7Ahs8bbPi7 Bcbs4M36DEv5XhI5TaIQER3ErrxlDK8fkt3FEj9cDZBtwX9RK+DfqytlP9rqC/6TlG3m tZNzxNWwDkaImKlZwl9xC3rAn7MT9NIrqSnuM/nCukAeBBg0JSdDOwy7rmBl5jMoGNNh tcIzUb7a/JHBixavG2W2kp3e+kFLGKIqvuzLrkTK76ZxWm0h3n2hGv57zy6oZG4yaBeW QFBGjWWrK8ZOtDRT4BIFzdHQuRfgiy9EgrNYpRZG/2q1Zq99yDZSvkBJuGVmXkCeMLs3 H3JA== X-RZG-AUTH: ":O2kGeEG7b/pS1EzgE2y7nF0STYsSLflpbjNKxx7cGrBOdI6BL9pkS3QW19mO7I+/JwRspuzJFZuRzQ==" X-RZG-CLASS-ID: mo00 Received: from aerfugl by smtp.strato.de (RZmta 47.3.2 AUTH) with ESMTPSA id 6072cdwA5FZL0Ik (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate) for ; Thu, 5 Nov 2020 16:35:21 +0100 (CET) Received: from koltrast.a98shuttle.de ([192.168.1.27] helo=a98shuttle.de) by aerfugl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1kahIG-0002NT-8y for linux-media@vger.kernel.org; Thu, 05 Nov 2020 16:35:20 +0100 Date: Thu, 5 Nov 2020 16:35:18 +0100 From: Michael Klein To: linux-media@vger.kernel.org Subject: [PATCH v2 1/2] media: rc: gpio-ir-recv: add recorder timeout property Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This optional property allows to set the recorder timeout via the devicetree: - linux,timeout-us: set the length of a space at which the recorder goes idle, specified in microseconds. Signed-off-by: Michael Klein --- drivers/media/rc/gpio-ir-recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index 22e524b69806..eb3e56c27c29 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@ -99,7 +99,8 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) rcdev->dev.parent = dev; rcdev->driver_name = KBUILD_MODNAME; rcdev->min_timeout = 1; - rcdev->timeout = IR_DEFAULT_TIMEOUT; + if (of_property_read_u32(np, "linux,timeout-us", &rcdev->timeout)) + rcdev->timeout = IR_DEFAULT_TIMEOUT; rcdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT; rcdev->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER; rcdev->map_name = of_get_property(np, "linux,rc-map-name", NULL);