diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2017-04-07 22:29:01 +0930 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-04-24 14:49:53 +0200 |
commit | 5ae4cb94b3133d00857bb2909dae779782db40cb (patch) | |
tree | db147b3a31d25174bc443168db106511b9a4b5ab /drivers/firmware/google | |
parent | 9d7163f5167fa60e71071ab6dcb60da0f7230beb (diff) | |
download | linux-5ae4cb94b3133d00857bb2909dae779782db40cb.tar.bz2 |
gpio: aspeed: Add debounce support
Each GPIO in the Aspeed GPIO controller can choose one of four input
debounce states: to disable debouncing for an input, or select from one
of three programmable debounce timer values. Each GPIO in a
four-bank-set is assigned one bit in each of two debounce configuration
registers dedicated to the set, and selects a debounce state by
configuring the two bits to select one of the four options.
The limitation on debounce timer values is managed by mapping offsets
onto a configured timer value and keeping count of the number of users
a timer has. Timer values are configured on a first-come-first-served
basis.
A small twist in the hardware design is that the debounce configuration
register numbering is reversed with respect to the binary representation
of the debounce timer of interest (i.e. debounce register 1 represents
bit 1, and debounce register 2 represents bit 0 of the timer numbering).
Tested on an AST2500EVB with additional inspection under QEMU's
romulus-bmc machine.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/firmware/google')
0 files changed, 0 insertions, 0 deletions