Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3330877pxk; Mon, 5 Oct 2020 07:11:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLwaAZcMdwo/TLOzCK2mXPG4ZkLU0yUhveE8A58C9F4yPYHS/LiRGAaWNCpIzwX04sq4WV X-Received: by 2002:a17:906:5613:: with SMTP id f19mr9462086ejq.441.1601907082558; Mon, 05 Oct 2020 07:11:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601907082; cv=none; d=google.com; s=arc-20160816; b=GsXV/i+JHTjepA4pwtVA/pIoZz2s4315F81S+95C4RBtc6b3zKfO1UKoUjeM7SOazz +zsEBrei5mkQxR+gKOOtOyiDneaVIKWWEHDYQt3YKL4PJ6R89qhHlZF94SD5F3GZQdtE /U1yvKDBVBl/M57lOryszHlkrYuNml7Jky/Ua4IkHPBdvrIRZMv8aZkbr+wQEidQVL86 odHfO0+gjpmYrUm53jOwhnhm8Lt7pIqfpo6M4WdNIlBea35c65vuwCKRD9G6m8DHeSSx m+xmX0WcJV4efLseypJ74Ou2wrFwNYLwCZGKyAs9Jadch6/csUxwJAC+ih62aeyd8z7k 4HLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=s+3A1PmDY4dVAnrDjIRvxQA7YXFtMMofHQBF/mLxoMc=; b=0E1Ig0y6tQng9m67ge/WXLZLwZysS0ryIaOuff7fhZaiP2Ss0qmWeSCyf6NY5pmcsa IWYrICvMuLSvzzxIbGIZlG2oeVWNcypL/2aH6PXIUq7LTIqfOqEKTVLatD6XQBzSwOXG BAIOu8hl08WMEskmav6TGfLy7ASWyYvUvd8b2P6TYs/98u82d/Ssv/fvj3xR8HjcZxbP LtYyFlW4A8mdT2fTbuwQQbXItxWWI527gMERDIAHLXrs1YlqAmSs0GOh5fqOXS75Td4o smNKJsL8peVWcV1cv7JPFmyu/npIwWJLgXWaaQczIhCxT2ddy6VCAgGr0gqF+lCslK8e 5wnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si24790edp.90.2020.10.05.07.10.54; Mon, 05 Oct 2020 07:11:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbgJEOJr (ORCPT + 99 others); Mon, 5 Oct 2020 10:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbgJEOJr (ORCPT ); Mon, 5 Oct 2020 10:09:47 -0400 Received: from gofer.mess.org (gofer.mess.org [IPv6:2a02:8011:d000:212::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A9F3C0613CE; Mon, 5 Oct 2020 07:09:47 -0700 (PDT) Received: by gofer.mess.org (Postfix, from userid 1000) id 6A10CC63C3; Mon, 5 Oct 2020 15:09:44 +0100 (BST) Date: Mon, 5 Oct 2020 15:09:44 +0100 From: Sean Young To: Rob Herring Cc: Joakim Zhang , Mauro Carvalho Chehab , Linux Media Mailing List , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , NXP Linux Team Subject: Re: [PATCH V3 1/2] bindings: media: gpio-ir-receiver: add linux,autosuspend-period property Message-ID: <20201005140944.GA8102@gofer.mess.org> References: <20200922190807.6830-1-qiangqing.zhang@nxp.com> <20200922190807.6830-2-qiangqing.zhang@nxp.com> <20200929155201.GA665464@bogus> <20201003084656.GA29917@gofer.mess.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 05, 2020 at 08:36:39AM -0500, Rob Herring wrote: > On Sat, Oct 3, 2020 at 3:46 AM Sean Young wrote: > > > > On Tue, Sep 29, 2020 at 10:52:01AM -0500, Rob Herring wrote: > > > On Wed, Sep 23, 2020 at 03:08:06AM +0800, Joakim Zhang wrote: > > > > Add linux,autosuspend-period property for gpio ir receiver. Some cpuidle > > > > systems wake from idle may take a bit long time, for such case, need > > > > disable cpuidle temporarily. > > > > > > > > Signed-off-by: Joakim Zhang > > > > --- > > > > ChangeLogs: > > > > V1->V2: > > > > * New add. > > > > V2->V3: > > > > * linux,autosuspend-period = 125; -> linux,autosuspend-period = <125>; > > > > --- > > > > Documentation/devicetree/bindings/media/gpio-ir-receiver.txt | 3 +++ > > > > 1 file changed, 3 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt b/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt > > > > index 58261fb7b408..e1447c9b0e26 100644 > > > > --- a/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt > > > > +++ b/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt > > > > @@ -7,6 +7,8 @@ Required properties: > > > > Optional properties: > > > > - linux,rc-map-name: see rc.txt file in the same > > > > directory. > > > > + - linux,autosuspend-period: autosuspend delay time, > > > > + the unit is milisecond. > > > > > > What makes this linux specific? > > > > Good point. "linux,autosuspend-period" does not say what is being > > suspended either. How about "cpuidle-suspend-period" instead? > > 'cpuidle' is a Linuxism. And you also need a unit suffix. > > I'm not clear on how autosuspend which is generally how long a > peripheral is idle before runtime suspending it relates to this which > seems to be concerned with cpu wakeup latency. I'm assuming you need > to wake up within a certain time period to capture GPIO edges. Don't > you know what this time would be based on IR data rates and can > provide that constraint to cpuidle? > > Also, we can set autosuspend times from sysfs. Why do you need to do > this from DT? This driver collects the timings of the edges on the gpio line, and sends them to the IR decoders. Waking up the cpu out of cpuidle causes random delays and therefore timing are off, on some hardware. This setting turns off cpuidle for a period to prevent these problems. Note that on this soc cpuidle is causing huge delays, 500 microseconds or so. Sean