pinctrl: at91: fix sam9x5 debounce/deglitch functions
commitc8dba02e7d5552a360ee5839f828856dd3a827cd
authorBoris BREZILLON <b.brezillon@overkiz.com>
Fri, 13 Sep 2013 07:47:22 +0000 (13 09:47 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 27 Sep 2013 12:11:34 +0000 (27 14:11 +0200)
tree3985fd90faa5b1e914dbb055f544c4d8e593dcf9
parent77966ad7b68112b1a536f994d78d88a9eaca25bc
pinctrl: at91: fix sam9x5 debounce/deglitch functions

Replace at91_mux_get_deglitch with at91_mux_pio3_get_deglitch when using
sam9x5 (pio3) IP.
at91_mux_get_deglitch only test the activation of the "Input Filter" which
may be overloaded by the activation of the "Input Filter Slow Clock" to use
the input filter as a debounce filter instead of a deglitch filter.

Fix at91_mux_pio3_get_debounce to test the activation of the Input Filter
before testing the activation of the debounce filter (Input Filter Slow
Clock depends on Input Filter).

Fix at91_mux_pio3_set_debounce function to avoid disabling the deglitch
filter ("Input Filter") when debounce filter is disabled.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-at91.c