Simple example: https://github.com/MiyooCFW/kernel/blob/master/drivers/input/keyboard/miyoo_kbd.c

CERN: EDGE driver generator (not published?)