From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Subject: Re: [PATCH 1/2] pinctrl: sunxi: Add support for interrupt debouncing
Date: Thu, 20 Oct 2016 15:56:25 +0200 [thread overview]
Message-ID: <20161020135625.vro5cxkf3rxevwyn@lukather> (raw)
In-Reply-To: <CACRpkdaoEH7OixJDkjuZ0qqYVURLvXwn8b41-OvqjZGJ=neh+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]
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-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> 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-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> (...)
> > +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.
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-10-20 13:56 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 [this message]
2016-11-02 19:51 ` Maxime Ripard
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=20161020135625.vro5cxkf3rxevwyn@lukather \
--to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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