Thread (16 messages) read the whole thread 16 messages, 3 authors, 2025-01-07

Re: [PATCH] pinctrl: sunxi: Use minimal debouncing period as default

From: Paul Kocialkowski <paulk@sys-base.io>
Date: 2024-11-20 10:06:01
Also in: linux-sunxi, lkml

Le Wed 20 Nov 24, 09:01, Maxime Ripard a écrit :
On Tue, Nov 19, 2024 at 07:47:43PM +0100, Paul Kocialkowski wrote:
quoted
quoted
quoted
In any case I don't think it makes sense for the platform code to impose
what a reasonable period for interrupts is (especially with such a large
period as default).
So you don't think it makes sense for the platform code to impose a
reasonable period, so you want to impose a (more, obviously) reasonable
period?
Yes absolutely. Anything that brings us closer to "you get what is really
happening with the hardware". The sunxi controller doesn't allow disabling
debouncing entirely, so the next best thing is to have it with the smallest
period.
That's an opinion, not a fact.
Yes and I'm trying to explain why I believe this is the most sensible opinion
here. I'm not saying everyone *has to* agree with me.
quoted
quoted
If anything, the status quo doesn't impose anything, it just rolls with
the hardware default. Yours would impose one though.
The result is that it puts a strong limitation and breaks many use cases by
default. I don't think we have to accept whatever register default was chosen
by hardware engineers as the most sensible default choice and pretend that this
is not a policy decision.
You're making it much worse than it is. It doesn't "break many use
cases" it broke one, by default, with a supported way to unbreak it, in
12 years.
I think this is exaggerated. Like I mentioned previously there are *many*
situations that are not covered by the default. The fact that I'm the first
person to bring it up in 12 years doesn't change that.

Sofar the downside you brought up boils down to: badly-designed hardware may
have relied on this mechanism to avoid interrupt storms that could prevent
the system from booting.

If that happens people can always increase the debouncing time with the
property as they need.

My point here is that the property should be used to accommodate for
broken hardware and that the default should work for most use cases,
including things as simple as an off-the-shelf sensor board.

That's all.

Paul

-- 
Paul Kocialkowski,

Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/

Specialist in multimedia, graphics and embedded hardware support with Linux.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help