Get staus of gpio by gpio's API

Signed-off-by: Keven Liu <airk908@gmail.com>