gpio: add support for 'both' edge mode

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>