lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110722092349.GM32058@legolas.emea.dhcp.ti.com>
Date:	Fri, 22 Jul 2011 12:23:50 +0300
From:	Felipe Balbi <balbi@...com>
To:	Brendan Moran <bremoran@...adcom.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: gpio_set_debounce return value specification

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
gpio_set_debounce()

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ