lkml.org 
[lkml]   [2006]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFC: Backlight Class sysfs attribute behaviour
On Mon, 06 Mar 2006 23:05:07 +0000
Richard Purdie <rpurdie@rpsys.net> wrote:

> My driver_brightness is really a more generic version of your
> "hw_power" which allows other factors to be taken into consideration
> as well. We may as well have the broader-range solution as it costs
> us nothing.
Ok, your solution seems fine to me. In fact, with the old backend we
don't have guarantees that current hardware state can be read in
general; it just happened to be true for used hardware.

I just would propose to change the prototype of

int (*set_status)(struct backlight_device *, int brightness, int power,
int fb_blank);

to

int (*set_status)(struct backlight_device *, struct backlight_status *);

This will allow adding new factors without changing the prototype
(thus without breaking old drivers which will simply ignore new added
factors).

I'm also not sure what should return

int (*get_status)(struct backlight_device *);

the brightness or the power status? Maybe it should be:

int (*get_status)(struct backlight_device *, struct backlight_status *);

--
Greetings,
Andrew
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-08 10:50    [W:0.261 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site