Re: [PATCH v4 3/8] gpio: cdev: go back to storing debounce period in the GPIO descriptor

From: Kent Gibson
Date: Thu Oct 17 2024 - 10:16:22 EST


On Thu, Oct 17, 2024 at 04:13:14PM +0200, Bartosz Golaszewski wrote:
> On Thu, Oct 17, 2024 at 2:44 PM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> >
> > On Thu, Oct 17, 2024 at 10:14:11AM +0200, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> > >
> > > @@ -1047,7 +925,7 @@ static int debounce_setup(struct line *line, unsigned int debounce_period_us)
> > > /* try hardware */
> > > ret = gpiod_set_debounce(line->desc, debounce_period_us);
> > > if (!ret) {
> > > - line_set_debounce_period(line, debounce_period_us);
> > > + WRITE_ONCE(line->desc->debounce_period_us, debounce_period_us);
> > > return ret;
> > > }
> >
> > Not related to this change, but this check looks redundant to me - the same
> > is performed where debounce_setup() is called.
> >
> > Want a patch to remove it?
> >
> > Cheers,
> > Kent.
>
> Sure! Can you rebase it on top of my series?
>

Will do - once patch 8 is sorted - so v5?

Cheers,
Kent.