gpio: set initially edge_mode and direction in handle