From: Maxime Ripard <maxime@cerno.tech>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Andreas Feldner <andreas@feldner-bv.de>,
Andreas Feldner <pelzi@flying-snail.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: dts: allwinner: minimize irq debounce filter per default
Date: Mon, 13 Feb 2023 09:43:29 +0100 [thread overview]
Message-ID: <20230213084329.ulckaigwd7dof37u@houat> (raw)
In-Reply-To: <20230210101814.2d36ae57@donnerap.cambridge.arm.com>
On Fri, Feb 10, 2023 at 10:18:14AM +0000, Andre Przywara wrote:
> > > Not sure if you were actually arguing this, but the change I sketched
> > > above (interpreting 0 as 24MHz/1) is separate though, as the current
> > > default is "no DT property", and not 0. There is no input-debounce
> > > property user in the kernel tree at the moment, so we wouldn't break
> > > anyone. The only thing that would change is if a downstream user was
> > > relying on "0" being interpreted as "skip the setup", which isn't
> > > really documented and could be argued to be an implementation detail.
> > >
> > > So I'd suggest to implement 0 as "lowest possible", and documenting that
> > > and the 32KHz/1 default if no property is given.
> >
> > Ah, my bad.
> >
> > There's another thing to consider: there's already a generic per-pin
> > input-debounce property in pinctrl.
> >
> > Since we can't control it per pin but per bank, we moved it to the
> > controller back then, but there's always been this (implicit)
> > expectation that it was behaving the same way.
> >
> > And the generic, per-pin, input-debounce documentation says:
> >
> > > Takes the debounce time in usec as argument or 0 to disable debouncing
> >
> > I agree that silently ignoring it is not great, but interpreting 0 as
> > the lowest possible is breaking that behaviour which, I believe, is a
> > worse outcome.
>
> Is it really? If I understand the hardware manuals correctly, we cannot
> really turn that feature off, so isn't the lowest possible time period (24
> MHz/1 at the moment) the closest we can get to "turn it off"? So
> implementing this would bring us actually closer to the documented
> behaviour? Or did I get the meaning of this time period wrong?
> At least that's my understanding of how it fixed Andreas' problem: 1µs
> is still not "off", but much better than the 31µs of the default. The new
> 0 would then be 0.041µs.
My point was that the property we share the name (and should share the
semantics with) documents 0 as disabled. We would have a behavior that
doesn't disable it. It's inconsistent.
The reason doesn't really matter, we would share the same name but have
a completely different behavior, this is super confusing to me.
Maxime
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-13 8:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 19:51 [PATCH] ARM: dts: allwinner: minimize irq debounce filter per default Andreas Feldner
2023-02-07 1:16 ` Andre Przywara
2023-02-08 12:50 ` Andreas Feldner
2023-02-09 20:29 ` Andre Przywara
2023-02-10 8:29 ` Maxime Ripard
2023-02-10 9:44 ` Andre Przywara
2023-02-10 10:06 ` Maxime Ripard
2023-02-10 10:18 ` Andre Przywara
2023-02-11 12:50 ` pelzi
2023-02-11 15:13 ` Andre Przywara
2023-02-11 18:08 ` [PATCH] pinctrl: sunxi: set minimal debounce on input-debounce 0 Andreas Feldner
2023-02-11 19:59 ` Andre Przywara
2023-02-13 8:43 ` Maxime Ripard [this message]
2023-02-13 8:49 ` [PATCH] ARM: dts: allwinner: minimize irq debounce filter per default pelzi
2023-02-13 9:18 ` Maxime Ripard
2023-02-13 11:56 ` Andre Przywara
2023-02-14 18:49 ` pelzi
2023-02-15 8:36 ` Maxime Ripard
2023-02-11 19:45 ` Samuel Holland
2023-02-13 1:51 ` Andre Przywara
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=20230213084329.ulckaigwd7dof37u@houat \
--to=maxime@cerno.tech \
--cc=andre.przywara@arm.com \
--cc=andreas@feldner-bv.de \
--cc=devicetree@vger.kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=pelzi@flying-snail.de \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox