Hi Sebastian, On Fri, Aug 21, 2020 at 1:16 PM Sebastian Reichel <[email protected]> wrote: > > This is supported by the hardware when the pinmux is configured
I assume you are referring to the SION bit. > correctly. Usually it is not, so this adds explicit code for this. > This fixes all GPIO regulators being shown as disabled. This has come up in the past and the consensus was to set the SION bit when reading the output of a GPIO is needed. Please see commit: commit 5dafa4543c399d329c7b01df1afa98437861cac0 Author: Benoît Thébaudeau <[email protected]> Date: Mon Aug 20 10:55:41 2012 +0000 mxc: Make gpio_get_value() use PSR gpio_get_value() should use PSR like Linux, not DR, because DR does not always reflect the pin state, while PSR does. This is especially useful to detect a short circuit on a GPIO pin configured as output, or to read the level of a pin controlled by a non-GPIO IOMUX function. Signed-off-by: Benoît Thébaudeau <[email protected]> Cc: Stefano Babic <[email protected]> Acked-by: Stefano Babic <[email protected]>

