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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 21 Jul 2011 13:52:56 -0700
From:	"Brendan Moran" <bremoran@...adcom.com>
To:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: gpio_set_debounce return value specification

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.

Brendan Moran

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ