2008-02-01 16:16:34 API for GPIO Wakeups
Christopher Harrsen (UNITED STATES)
Message: 50582
I would like to use the API for GPIO wakeups. This is a kernel space API. Does this mean I have to compile my application to run in Kernel space. How do I call these functions from user space?
QuoteReplyEditDelete
2008-02-01 16:49:18 Re: API for GPIO Wakeups
Robin Getz (UNITED STATES)
Message: 50585 Chris:
Just to understand the terminology: _in kernel_ interfaces ( interface between drivers and kernel functions - the "kernel API") are not the kernel to userspace interfaces (the "syscall interface").
You can not use a kernel API from userspace.
You can not run an userspace application in the kernel.
The kernel GPIO API is at:
http://docs.blackfin.uclinux.org/doku.php?id=gpio
But, this has nothing to do with userspace. What you need to do is write a GPIO driver, that exposes this to userspace.
Since this is pretty common - we added a GPIO driver:
http://docs.blackfin.uclinux.org/doku.php?id=sample_gpio_driver
To usethat GPIO from userspace:
http://docs.blackfin.uclinux.org/doku.php?id=sample_gpio_driver#test_the_driver
and have a look at the example code.
-Robin
QuoteReplyEditDelete
2008-02-05 15:47:37 Re: API for GPIO Wakeups
Christopher Harrsen (UNITED STATES)
Message: 50712
Robin:
Do you have user space code examples of using ioctls' to configure specific GPIOs as interrupts? Also, which ioctl calls (or system calls) can I use to put the processor into sleep mode?
Thanks,
Chris
QuoteReplyEditDelete
2008-02-05 17:42:35 Re: API for GPIO Wakeups
Robin Getz (UNITED STATES)
Message: 50716 Chris:
At the moment - it looks like the docs do not reflect the existing code - it might take a day or two to fix up.
I will let you know as soon as it is done.
-Robin
QuoteReplyEditDelete
2008-02-05 20:09:54 Re: API for GPIO Wakeups
Mike Frysinger (UNITED STATES)
Message: 50720 you do not use ioctl's to create interrupt handlers. if you want to use a GPIO as an interrupt source, you currently need to write a kernel driver to do so.
to put the processor to sleep, you use the sysfs interface ... this part should be in the power management document in the wiki.
QuoteReplyEditDelete
2009-01-14 02:26:49 Re: API for GPIO Wakeups
Larry Fiery (UNITED STATES)
Message: 67902
Robin:
The links below say "you've followed a link to a topic that doesn't exist yet.":
http://docs.blackfin.uclinux.org/doku.php?id=sample_gpio_driver
http://docs.blackfin.uclinux.org/doku.php?id=sample_gpio_driver#test_the_driver
-Larry
QuoteReplyEditDelete
2009-01-14 06:17:47 Re: API for GPIO Wakeups
Mike Frysinger (UNITED STATES)
Message: 67939
the wiki does have a search function ...
QuoteReplyEditDelete
2009-01-14 12:01:32 Re: API for GPIO Wakeups
Robin Getz (UNITED STATES)
Message: 67945
Larry:
We are moving some of the pages around -- sorry for the confusion - the page names should be close - there may be a chapter name inbetween.
-Robin