Re: gpio_set_debounce return value specification

From: Felipe Balbi
Date: Fri Jul 22 2011 - 05:23:58 EST

On Thu, Jul 21, 2011 at 01:52:56PM -0700, Brendan Moran wrote:
> Regarding gpio_set_debounce, declared in include/linux/gpio.h, defined
> in drivers/gpio/gpiolib.c
> The return value for gpio_set_debounce isn't clearly specified.  The
> current use of the return value appears to be 0 on success, <0 on
> error.  Because many hardware implementations allow only specific
> debounce intervals, the actual debounce setting after calling
> gpio_set_debounce is unlikely to be the argument with which it was
> called.
> I suggest that on success, the return value should be a positive
> integer indicating, in microseconds, the actual debounce interval
> which has been applied.  A value of 0 would indicate that the debounce
> was applied successfully, but the driver does not support this
> reporting.
> The current code in gpiolib.c would support this without change.   A
> documentation change to gpiolib.c and gpio.h would be necessary.

Just send a patch fixing the documentation and the current users of


Attachment: signature.asc
Description: Digital signature