As nobody could help me, finally I successfully patched the kernel to
handle the brightness buttons on my Dell laptop.
I used the pmf system to notify the driver about the key events.
Please find the patch attached.
Some drawbacks in which I need help to improve:
* I had to add a new field into struct device in sys/device.h. The new
field has a name dv_payload.
I couldn't find a better solution to save the original drm_device
structure for the new callbacks,
however I think there should be one;
* In both callback functions in intel_panel.c I had to break the
connector's loop after the 1st
iteration. Otherwise the system simply crashes. I have to find out
why is that.
So, plase read the patch, try it out.
I could try only on my Dell Latitude E6220, which uses the PCH line.
With this patch it works as expected.
Other chips may not work.