I have a switch at D5 pin of imx6ul evk. I want read D5(gpio2 21) state. Since it's D5(gpio2 21) then it showuld be (2-1)*32 + 21 = 53 gpio53. When I try read it's value using following method
echo 53 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio53/direction
it shows 0 but if I use multimeter to measure voltage at this pin then multimeter shows high. So shouldn't cat /sys/class/gpio/gpio53/value show 1?