Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751171AbWCHJsW (ORCPT ); Wed, 8 Mar 2006 04:48:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932530AbWCHJsV (ORCPT ); Wed, 8 Mar 2006 04:48:21 -0500 Received: from mail.homelink.ru ([81.9.33.123]:45265 "EHLO eltel.net") by vger.kernel.org with ESMTP id S1751689AbWCHJsV (ORCPT ); Wed, 8 Mar 2006 04:48:21 -0500 Date: Wed, 8 Mar 2006 12:48:07 +0300 From: Andrew Zabolotny To: Richard Purdie Cc: adaplas@gmail.com, linux-fbdev-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: RFC: Backlight Class sysfs attribute behaviour Message-Id: <20060308124807.6b995cf4.zap@homelink.ru> In-Reply-To: <1141686307.6524.98.camel@localhost.localdomain> References: <1141571334.6521.38.camel@localhost.localdomain> <440B89AB.3020203@gmail.com> <1141634729.6524.14.camel@localhost.localdomain> <20060307000718.0e8b8be3.zap@homelink.ru> <1141686307.6524.98.camel@localhost.localdomain> Organization: home X-Mailer: Sylpheed version 2.0.0beta6 (GTK+ 2.6.7; i686-pc-linux-gnu) X-Face: #%`a@cSvZ:n@M%n/to$C^!{JE%'%7_0xb("Hr%7Z0LDKO7?w=m~CU#d@-.2yO9 epB|2@pe{%4[Q3pw""FeqiT6rOc>+8|ED/6=Eh/4l3Ru>qRC]ef%ojRz;GQb=uqI 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/