This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to set gpio in am335x linux kernel?

Hi everyone:

i want to set gpio3_21 to output with high in kernel. but i don't know how to do it. whether anyone can give me a example? i used am335x_evm 05.05 sdk.

{"mcasp0_ahclkx.gpio3_21",        OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},this is the pin i initialized. i tracked it found it just wrote to 0x9ac(reg offset) with 7.

[    0.976287] muxmode=7
[    0.978698] partitionname=core
[    0.981903] partitionflag=0
[    0.984893] partitionbase=f9e10000
[    0.988464] muxregoffset=2476(0x9ac)