devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Rob Herring <robh@kernel.org>
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH V3 1/2] bindings: media: gpio-ir-receiver: add linux,autosuspend-period property
Date: Mon, 5 Oct 2020 15:09:44 +0100	[thread overview]
Message-ID: <20201005140944.GA8102@gofer.mess.org> (raw)
In-Reply-To: <CAL_JsqKEqG_Xous_gf=t9LTY8ZGzwcCYNjMDEGt8bA17JUgW-g@mail.gmail.com>

On Mon, Oct 05, 2020 at 08:36:39AM -0500, Rob Herring wrote:
> On Sat, Oct 3, 2020 at 3:46 AM Sean Young <sean@mess.org> 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 <qiangqing.zhang@nxp.com>
> > > > ---
> > > > 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

  reply	other threads:[~2020-10-05 14:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 19:08 [PATCH V3 0/2] Add QoS support for cpuidle system Joakim Zhang
2020-09-22 19:08 ` [PATCH V3 1/2] bindings: media: gpio-ir-receiver: add linux,autosuspend-period property Joakim Zhang
2020-09-29 15:52   ` Rob Herring
2020-10-03  8:46     ` Sean Young
2020-10-05 13:36       ` Rob Herring
2020-10-05 14:09         ` Sean Young [this message]
2020-09-22 19:08 ` [PATCH V3 2/2] media: rc: gpio-ir-recv: add QoS support for cpuidle system Joakim Zhang
2020-09-23  7:06 ` [PATCH V3 0/2] Add " Sean Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201005140944.GA8102@gofer.mess.org \
    --to=sean@mess.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=qiangqing.zhang@nxp.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).