Re: Re: Backlight support
flat view
From: Andrew Zabolotny <hidden>
Date: 2004-12-01 22:35:28
On Tue, 30 Nov 2004 16:28:26 -0000 "Richard Purdie" [off-list ref] wrote:
I think the above patch was nearly there. The issues seemed to be with the method of associating framebuffer devices with their backlights. I've come up with a solution to that problem (see below) so that code can be removed from that patch and that should make it acceptable for mainstream kernel inclusion.
I confirm that the solution you proposed is quite suitable for the job. I've already modified the lcd/backlight subsystem, and I have a few comments; a) First of all, the implementation of your idea looks quite well (it's simpler and cleaner than the old method), although initially I didn't like it (mea culpa). I have removed a lot of now unneeded code from b/l support, and also it removes a lot of lcd/backlight maintainance code from the framebuffer drivers(pxafb, sa11xxfb, mq11xxfb). Last but not least, it removed the class_find_device() function that was the sticking point in the discussion with gkh. b) No modification is needed to the existing lcd/backlight drivers (there are about ten of them in hh.org cvs). I've added just one more function pointer in the lcd_properties and backlight_properties to a function that gets a fb_info and examinates if it is the framebuffer to which the lcd/backlight is attached to. If the function is NULL, the framebuffer is considered to match (since in PDAs there's only one framebuffer, this perfectly fits already existing drivers). c) There's a problem though; if someone will REALLY want to inspect the fb_info, it would be very helpful to be able to deduce somehow the 'struct device' associated with the framebuffer, since the fb_info itself doesn't contain anything more useful than the current resolution and pixel format. Knowing the device (and its position on the parent bus) the backlight/lcd driver will know exactly what to look at. I've seen some semi-commented code in 2.6.10 which tells me there are plans to integrate the fb_info into the sysfs (and, therefore, to add a class_device somewhere in the fb_info); this will allow also the b/l drivers to find the associated framebuffer device. Am I correct in my assumptions? As soon as handhelds.org will be up, I'll be able to test the code and, once it'll work, I'll send a patch to linux-fbdev-devel@. -- Greetings, Andrew ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/