[BACKPORT v5.4 PATCH] pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ