On Tue, 2009-04-07 at 15:25 +0800, Zhao, Yakui wrote: > > > But if we do so, it seems that we have to solve the dependency issue > > > among acpi_video, i915 and platform driver. > > > For example: I915 driver is loaded firstly and the interface will be > > > registered. But after the acpi video driver/platform driver is loaded, > > > how to send the notification event that i915 should unregister its > > > interface? If the interface is unregistered, we will have to consider > > > the arbiter order. > > > > The acpi case is uninteresting - acpi_video_backlight_support() doesn't > > require the acpi video driver. The platform driver case is more > > interesting, but the easiest solution is probably to add a notifier > > chain for backlight device add and have i915 unregister when a platform > > device registers. > Yes. We will have to create the communication channel between backlight > device and i915 driver. And when a backlight I/F is registered, we will > have to check whether the backlight I/F in 915 should be unregistered. > Right? > Does this make the problem complex? > > that's why I proposed to implement a backlight manager in the sysfs backlight class driver.
All subsystems can register a set of callbacks for backlight control in its own way, e.g. ACPI, platform driver, i915. And the backlight manager only exports one single I/F to users, like: ----| |----brightness |----actual_brightness |----max_brightness |----... |----mode and it supports multiple modes, e.g. 1. generic ---ACPI 2. platform---platform drivers 3. legacy-----i915 The sysfs backlight manager always chooses the mode with highest priority (generic > platform > legacy), and call the respective callbacks when backlight is changed. For example, the backlight manager switches to the "generic" mode from "legacy" mode automatically when ACPI video driver is loaded at runtime. thanks, rui ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel