I am using Linux Kernel 4.1 on an iMX27 with no trouble until now.
I want to use GPIO 27 on port D which is number 123 in Linux.
With a scope probe I see the signal is high at boot time. No error is displayed when exporting it from the sysfs, but the signal does not go low when I "echo 0 > value".
By searching sentences like "GPIO always on" within google I figured out that the problem could be due to a wrong pin muxing. The imx27-pinfunc.h file (arch/arm/boot/dts/) shows that PD27 may also be a Slave Select signal for SPI (MX27_PAD_CSPI1_SS1__GPIO4_27). But I also read that if SPI was not enabled in the device tree then the function used for the gpio would be "gpio" and not "primary function" (SPI SS) nor "alternate function". Am I right ?
The imx27.dtsi file (from kernel mainline) has the three SPI fields set to "disabled". My own device tree source includes this file and declares absolutely no node with SPI enabled (I do not use it).
So any guess on how I could get the mastery of that GPIO back ?
Is the SPI/muxing source of the problem a valid idea ?
Thanks in advance.
NB 1: I am sure there is no problem with my syntax on how to export gpio, I use it really often.
NB 2: I know this pin works because with an older kernel (2.6) on the same hardware I may toggle the signal by the exactly same sequence of operations.