has someonme an example for accessing the gpios from userspace using
the "low level I/O API", like read(), write(), also mmap()?
Robert
Okay, I wrote a little kernel module and tried to use gpio_is_valid.
But with every gpio value between 0 and 180 it fails:
Code of the init kernel mod routine:
static int hello_init(void)
{
int gpio, rv;
for(gpio=0; gpio<180; gpio++)
{
rv = gpio_is_valid(gpio);
printk(KERN_ALERT "GPIO %i: %i\n", gpio, rv);
}
return 0;
}
output:
Nov 4 08:02:36 beagleboard user.alert kernel: GPIO 0: 1
Nov 4 08:02:36 beagleboard user.alert kernel: GPIO 1: 1
Nov 4 08:02:36 beagleboard user.alert kernel: GPIO 2: 1
...
Nov 4 08:02:36 beagleboard user.alert kernel: GPIO 177: 1
Nov 4 08:02:36 beagleboard user.alert kernel: GPIO 178: 1
Nov 4 08:02:36 beagleboard user.alert kernel: GPIO 179: 1
What else is needed? I read through the bb manual and read something
about setting the mux register of the omap?!?!
Robert