56 perror(
"gpio/export");
60 len = snprintf(buf,
sizeof(buf),
"%d", gpio);
77 perror(
"gpio/export");
81 len = snprintf(buf,
sizeof(buf),
"%d", gpio);
95 snprintf(buf,
sizeof(buf),
SYSFS_GPIO_DIR "/gpio%d/direction", gpio);
97 fd = open(buf, O_WRONLY);
99 perror(
"gpio/direction");
122 fd = open(buf, O_WRONLY);
124 perror(
"gpio/set-value");
148 fd = open(buf, O_RDONLY);
150 perror(
"gpio/get-value");
178 fd = open(buf, O_WRONLY);
180 perror(
"gpio/set-edge");
184 write(fd, edge, strlen(edge) + 1);
200 fd = open(buf, O_RDONLY | O_NONBLOCK );
202 perror(
"gpio/fd_open");
225 fd = open(buf, O_WRONLY);
227 perror(
"failed to open OMAP_MUX");
230 write(fd, mode, strlen(mode) + 1);