I know all of that. My question is lower-level than that.
I'm talking about how do you set the registers to configure the pad to even be accessible as a GPIO instead of the other possible modes that each pad can be.
I figured out something that works, but I'm not entirely clear on the concept and would like to fully understand the proper way to do it. Here's the code I'm using to set GPIO3_IO09:
#include "iomux_register.h"
#define GPIO3_IO09 73
{
void __iomem *eim_da9 = ioremap(IOMUXC_SW_MUX_CTL_PAD_EIM_DA9,28);
writel(0x05,eim_da9);
gpio_request(GPIO3_IO09,"gpio3-09");
gpio_direction_output(GPIO3_IO09,0);
}
It's the ioremap and the writel part that I'm talking about.