
Hi Benoit, Eric, Otavio,
On 01/10/2013 21:50, Benoît Thébaudeau wrote:
You probably wouldn't just set SION on all pins, right? I suspect that there'd be some ramification in terms of power consumption if nothing else.
Right. Well, instead of adding SION to the pin definition header files, then we could just add SION where needed on a per-pin basis, e.g.:
imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 | IOMUX_CONFIG_SION << MUX_MODE_SHIFT);
A helper macro could be defined in arch/arm/include/asm/imx-common/iomux-v3.h in order to simplify the writing, e.g.:
#define MUX_MODE_SION (IOMUX_CONFIG_SION << MUX_MODE_SHIFT)
imx_iomux_v3_setup_pad(MX6_PAD_NANDF_D1__GPIO_2_1 | MUX_MODE_SION);
On the Linux side of things, the CONFIG field in the pinctrl DT bindings already provides bit 30 for SION. Hence, using MUX_MODE_SION like above would be close to Linux's pin config.
Agree, this is a better solution for the issue, and it is easier to be tracked as setting SION for all pins.
Best regards, Stefano