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

From: Maxime Ripard
Date: Wed Nov 20 2024 - 03:02:04 EST


On Tue, Nov 19, 2024 at 07:47:43PM +0100, Paul Kocialkowski wrote:
> > > 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.

> > 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.

Maxime

Attachment: signature.asc
Description: PGP signature