Re: [PATCH] eeepc-wmi: new driver for WMI based hotkeys on Eee PC laptops
From: Yong Wang <hidden>
Date: 2010-03-20 12:33:14
On Sat, Mar 20, 2010 at 09:20:50AM -0300, cascardo@holoscopio.com wrote:
On Sat, Mar 20, 2010 at 08:55:53AM +0800, Yong Wang wrote:quoted
One question just popped off the top my head. What if there is a power applet that wants to display a slider field at the bottom of the screen showing the current brightness real time whenever users press brightness hotkeys? Shouldn't it listen to the standard input events translated by X into standard XF86 keysyms? Or shall it listen to the ACPI backlight events? If so, it is the ACPI LCD event when using acpi backlight driver. But what if those vendor specific backlight drivers are used? Thanks -Yong --You may select/poll for the sysfs file actual_brightness. It will return POLLPRI. Basically, backlight devices end up calling sysfs_notify that will allow sysfs_poll to work. Read the comments about sysfs_poll at fs/sysfs/file.c. You should either use backlight_force_update in your driver or let the user update it writing to the brightness file. In your case, I'd say you should use backlight_force_update and give BACKLIGHT_UPDATE_HOTKEY as the reason.
Oh, I see. Thank for clarifying, Cascardo. -Yong