On Sat, Mar 20, 2010 at 09:20:50AM -0300, cascardo@xxxxxxxxxxxxxx wrote: > On Sat, Mar 20, 2010 at 08:55:53AM +0800, Yong Wang wrote: > > > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html