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