I have an unexpected problem with exporting (opening) the two user defined buttons on the QSB.
/sys/class/gpio is enabled in the kernel.
According to the QSB users manual:
USERDEF1: USERDEF2:
These two buttons are user defined buttons attached to PATA_DATA14 (P6) and PATA_DATA15 (P5).
---------------------------------------------
iomux-mx53.h is unmodified and contains:
#define _MX53_PAD_PATA_DATA14__GPIO2_14 IOMUX_PAD(0x660, 0x2DC, 1, 0x0, 0, 0)
....
#define _MX53_PAD_PATA_DATA15__GPIO2_15 IOMUX_PAD(0x664, 0x2E0, 1, 0x0, 0, 0)
....
....
#define MX53_PAD_PATA_DATA14__GPIO2_14 (_MX53_PAD_PATA_DATA14__GPIO2_14 | MUX_PAD_CTRL(NO_PAD_CTRL))
....
#define MX53_PAD_PATA_DATA15__GPIO2_15 (_MX53_PAD_PATA_DATA15__GPIO2_15 | MUX_PAD_CTRL(NO_PAD_CTRL))
....
---------------------------------------------
mx53_loco.c is unmodified and contains:
static iomux_v3_cfg_t mx53_loco_pads[]
{
....
/* GPIO */
....
MX53_PAD_PATA_DATA14__GPIO2_14,
MX53_PAD_PATA_DATA15__GPIO2_15,
....
};
---------------------------------------------
Calculating GPIO number:
GPIO2_14 = (2 - 1) * 32 + 14 = 46
GPIO2_15 = (2 - 1) * 32 + 15 = 47
At the command line, export GPIO2_14 and GPIO_15:
echo 46 > /sys/class/gpio/export
echo 47 > /sys/class/gpio/export
.... no error is shown.
Then do "ls /sys/class/gpio" but they do not appear in the file list
I can do the same with GPIO number 199, which is the LED on the QSB, and it works fine.
/sys/class/gpio/gpio199 appears in the file list when I do ls and I can set and clear it to turn the LED on and off.
Any ideas? Thanks.