From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>
Subject: Re: [PATCH 1/2] pinctrl: sunxi: Add support for interrupt debouncing
Date: Wed, 2 Nov 2016 20:51:06 +0100 [thread overview]
Message-ID: <20161102195106.eazrl5oevykltvzd@lukather> (raw)
In-Reply-To: <20161020135625.vro5cxkf3rxevwyn@lukather>
[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]
Hi Linus,
On Thu, Oct 20, 2016 at 03:56:25PM +0200, Maxime Ripard wrote:
> Hi Linus,
>
> On Thu, Oct 20, 2016 at 03:04:46PM +0200, Linus Walleij wrote:
> > On Wed, Oct 19, 2016 at 11:15 AM, Maxime Ripard
> > <maxime.ripard@free-electrons.com> wrote:
> >
> > > The pin controller found in the Allwinner SoCs has support for interrupts
> > > debouncing.
> > >
> > > However, this is not done per-pin, preventing us from using the generic
> > > pinconf binding for that,
> >
> > How typical.
> >
> > > but per irq bank, which, depending on the SoC,
> > > ranges from one to five.
> > >
> > > Introduce a device-wide property to deal with this using a nanosecond
> > > resolution.
> > >
> > > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > (...)
> > > +Note: For backward compatibility reasons, the hosc and losc clocks are
> > > +only required if you need to use the optional
> > > +allwinner,debounce-time-ns property. Any new device tree should set them.
> > > +
> > > +Optional properties:
> > > + - allwinner,debounce-time-ns: Array of debouncing periods in
> > > + nanoseconds. One period per irq bank found in the controller
> >
> > Do you really *need* to specify this with nanosecond resolution?
> >
> > Else I would suggest to use microsecond resolution and just use
> > the generic binding (input-debounce) but on the device node instead
> > of the specific handler.
>
> Theorically, the debouncing clock can be set at 24MHz, which means a
> 42ns resolution.
>
> I've seen that the other bindings usually use microseconds, but in our
> case, we can really go lower than that.
>
> I don't really know if it makes sense though.
Any comments on this?
Thanks,
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2016-11-02 19:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 9:15 [PATCH 0/2] pinctrl: sunxi: Support the interrupt debouncing Maxime Ripard
[not found] ` <cover.ed6c19bdf01ae70096f3d96af4805f59ef16f94a.1476868462.git-series.maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-10-19 9:15 ` [PATCH 1/2] pinctrl: sunxi: Add support for " Maxime Ripard
2016-10-20 13:04 ` Linus Walleij
[not found] ` <CACRpkdaoEH7OixJDkjuZ0qqYVURLvXwn8b41-OvqjZGJ=neh+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-20 13:56 ` Maxime Ripard
2016-11-02 19:51 ` Maxime Ripard [this message]
2016-11-07 9:40 ` Linus Walleij
2016-11-08 19:23 ` Maxime Ripard
2016-10-19 9:15 ` [PATCH 2/2] ARM: sunxi: Add the missing clocks to the pinctrl nodes Maxime Ripard
2016-10-20 13:05 ` Linus Walleij
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=20161102195106.eazrl5oevykltvzd@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=wens@csie.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.