Re: [PATCH v9 12/20] gpiolib: cdev: support setting debounce

2020-09-25 Thread Andy Shevchenko
On Thu, Sep 24, 2020 at 10:49 AM Kent Gibson wrote: > On Wed, Sep 23, 2020 at 07:27:37PM +0300, Andy Shevchenko wrote: > > On Tue, Sep 22, 2020 at 5:36 AM Kent Gibson wrote: ... > > Shouldn't we rather return 0/1 guaranteed? > > > > Perhaps > > > > if (active_low) > > return !value; > > > >

Re: [PATCH v9 12/20] gpiolib: cdev: support setting debounce

2020-09-24 Thread Kent Gibson
On Wed, Sep 23, 2020 at 07:27:37PM +0300, Andy Shevchenko wrote: > On Tue, Sep 22, 2020 at 5:36 AM Kent Gibson wrote: > > > > Add support for setting debounce on a line via the GPIO uAPI. > > Where debounce is not supported by hardware, a software debounce is > > provided. > > > > The implementati

Re: [PATCH v9 12/20] gpiolib: cdev: support setting debounce

2020-09-23 Thread Andy Shevchenko
On Tue, Sep 22, 2020 at 5:36 AM Kent Gibson wrote: > > Add support for setting debounce on a line via the GPIO uAPI. > Where debounce is not supported by hardware, a software debounce is > provided. > > The implementation of the software debouncer waits for the line to be > stable for the debounce

[PATCH v9 12/20] gpiolib: cdev: support setting debounce

2020-09-21 Thread Kent Gibson
Add support for setting debounce on a line via the GPIO uAPI. Where debounce is not supported by hardware, a software debounce is provided. The implementation of the software debouncer waits for the line to be stable for the debounce period before determining if a level change, and a corresponding