Hello.
I try to implement touchscreen driver. I have resistive touchscreen and this touchscreen used GPIO pin for interrupt on tap. I try to extend my GPIO driver for this. I know how to handle IRQ in driver but I need to send this IRQ event from GPIO driver to touchscreen driver. How to do it? I see only polling from touchscreen driver. Or can I use other solution?
-- Ivan Loskutov
Hello Ivan,
On 17.07.2012 08:38, Ivan Loskutov wrote:
Hello.
I try to implement touchscreen driver. I have resistive touchscreen and this touchscreen used GPIO pin for interrupt on tap. I try to extend my GPIO driver for this. I know how to handle IRQ in driver but I need to send this IRQ event from GPIO driver to touchscreen driver. How to do it? I see only polling from touchscreen driver. Or can I use other solution?
What about providing the IRQ service by the GPIO driver itself. You can route the IRQ service requests of the touchscreen-driver (in init's configuration) to the gpio-driver, and for all other children to core (like it's the default case). The touchscreen-driver can use the IRQ interface the same way as if the IRQ service would reside in core. Btw. that's one of the main reasons why we love these virtualizeable services in Genode.
I hope I got your question right, and this is what you were looking for?
Best regards Stefan
PS: looking forward to test out your touchscreen-driver!
-- Ivan Loskutov
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello Stefan,
Thanks. I'll try this method. I forgot about this wonderful feature.
-- Ivan Loskutov
2012/7/17 Stefan Kalkowski <stefan.kalkowski@...1...>
Hello Ivan,
On 17.07.2012 08:38, Ivan Loskutov wrote:
Hello.
I try to implement touchscreen driver. I have resistive touchscreen and this touchscreen used GPIO pin for interrupt on tap. I try to extend my GPIO driver for this. I know how to handle IRQ in driver but I need to send this IRQ event from GPIO driver to touchscreen driver. How to do it? I see only polling from touchscreen driver. Or can I use other
solution?
What about providing the IRQ service by the GPIO driver itself. You can route the IRQ service requests of the touchscreen-driver (in init's configuration) to the gpio-driver, and for all other children to core (like it's the default case). The touchscreen-driver can use the IRQ interface the same way as if the IRQ service would reside in core. Btw. that's one of the main reasons why we love these virtualizeable services in Genode.
I hope I got your question right, and this is what you were looking for?
Best regards Stefan
PS: looking forward to test out your touchscreen-driver!
-- Ivan Loskutov
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond.
Discussions
will include endpoint security, mobile security and the latest in
malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
-- Stefan Kalkowski Genode Labs
http://www.genode-labs.com/ · http://genode.org/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hello,
I agree with Stefan that implementing the IRQ session-interface by the GPIO driver sounds like a good idea.
More generally speaking, if you have custom RPC interface and the server needs to notify its client of an event in an asynchronous fashion, Genode's signaling API is the way to go:
https://github.com/genodelabs/genode/blob/master/base/include/base/signal.h
For a good example where this facility is used, please refer to the terminal-session interface:
https://github.com/genodelabs/genode/blob/master/os/include/terminal_session...
Here the client can register a signal handler via the 'read_avail_sigh()' RPC call. The registered signal handler will receive a signal each time when new input becomes available for reading. (for example, when the user presses a key on an interactive terminal)
BTW, you will notice that, as of now, the IRQ session interface is not using the signaling mechanism. It is using a blocking 'wait_for_irq()' RPC call to wait for IRQs instead. However, we will possibly revisit the interface in this respect in the future.
Cheers Norman
I can't handle GPIO IRQ. I check my previous driver for Gumstix Overo. It doesn't work too in current snapshot Genode from git. I revert my fork to state before merging your master and this driver is working.
-- Ivan Loskutov
Sorry. IRQ is work. I write simple test and check it.
-- Ivan Loskutov
2012/7/19 Ivan Loskutov <loskutov.ivan@...9...>
I can't handle GPIO IRQ. I check my previous driver for Gumstix Overo. It doesn't work too in current snapshot Genode from git. I revert my fork to state before merging your master and this driver is working.
-- Ivan Loskutov