Skip to content
Commit 1766e4b7 authored by Daniel Kurtz's avatar Daniel Kurtz Committed by Linus Walleij
Browse files

pinctrl/amd: fix gpio irq level in debugfs



According to the AMD BKDG, the GPIO ActiveLevel bits (10:9) map to:
 00 Active High
 01 Active Low
 10 Active on both edges iff LevelTrig (bit 8) == 0
 11 Reserved

The current code has a bug where it interprets 00 => Active Low, and
01 => Active High.

Fix the bug, restrict "Active on both" to just the edge trigger case, and
refactor a bit to make the logic more readable.

Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 2e25a9cb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment