summaryrefslogtreecommitdiff
path: root/Documentation/input/cd32.txt
diff options
context:
space:
mode:
authorDavid Rivshin <DRivshin@allworx.com>2017-04-25 01:56:50 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-04-28 10:50:22 +0300
commit83977443938122baeed28dc9f078db3da9855f7c (patch)
treed2a5106491740b2c8330a8de9a3d3c6badfe6cda /Documentation/input/cd32.txt
parent9384793036afb7529c1c564e839ef4356271d68e (diff)
downloadlinux-83977443938122baeed28dc9f078db3da9855f7c.tar.xz
gpio: omap: return error if requested debounce time is not possible
omap_gpio_debounce() does not validate that the requested debounce is within a range it can handle. Instead it lets the register value wrap silently, and always returns success. This can lead to all sorts of unexpected behavior, such as gpio_keys asking for a too-long debounce, but getting a very short debounce in practice. Fix this by returning -EINVAL if the requested value does not fit into the register field. If there is no debounce clock available at all, return -ENOTSUPP. Fixes: e85ec6c3047b ("gpio: omap: fix omap2_set_gpio_debounce") Cc: <stable@vger.kernel.org> # 4.3+ Signed-off-by: David Rivshin <drivshin@allworx.com> Acked-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'Documentation/input/cd32.txt')
0 files changed, 0 insertions, 0 deletions