From: Pavel Machek <pavel@ucw.cz>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: Andrew Zabolotny <zap@homelink.ru>,
adaplas@gmail.com, linux-fbdev-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: RFC: Backlight Class sysfs attribute behaviour
Date: Mon, 6 Mar 2006 22:47:58 +0100 [thread overview]
Message-ID: <20060306214758.GB4701@elf.ucw.cz> (raw)
In-Reply-To: <1141603734.6521.85.camel@localhost.localdomain>
Hi!
> > Well with power it's simple: LCD is either powered or it's not. After
> > resuming the LCD should be always powered on, and the program can then
> > turn it back off if it's desired. FB blanking isn't a issue with X11/
> > Qtopia, as far as I understand? And finally, the 'user' requested power
> > state has to be tracked by the program that does the blanking (say an
> > audio player or such).
>
> So the user powers down the LCD, the FB blanking then blanks and
> unblanks. What should the current LCD power status be? The LCD should
> still be off as far as I can see yet the LCD/backlight class doesn't do
> this at present.
>
> I'm beginning to favour a system where backlight drivers only provide
> two functions:
>
> int (*set_status)(struct backlight_device *, int brightness, int power, int fb_blank);
> int (*get_status)(struct backlight_device *);
>
> set_status passes the user requested brightness and power values along
> with the current fb_blanking status to the driver. The driver can then
> set the hardware up as appropriate.
>
> get_status returns the brightness for the current configuration.
>
> The backlight core itself keeps track of the requested power and
> brightness values rather than having every backlight driver including
> the logic. This has the advantage of keeping behaviour the same and
> avoiding subtle logic bugs of which there are several at the moment.
>
> This also means that "echo 31 > brightness; cat brightness" will always
> give the expected answer of whatever brightness the user is requesting
> and the actual current driver brightness choice is available through
> "cat driver_brightness".
>
> Does this seem reasonable?
Yep. Keeping hardware drivers as simple as possible is good.
Pavel
--
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
next prev parent reply other threads:[~2006-03-06 21:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-05 15:08 RFC: Backlight Class sysfs attribute behaviour Richard Purdie
2006-03-05 22:09 ` Andrew Zabolotny
2006-03-06 0:08 ` Richard Purdie
2006-03-06 21:47 ` Pavel Machek [this message]
2006-03-06 1:00 ` Antonino A. Daplas
2006-03-06 8:45 ` Richard Purdie
2006-03-06 21:07 ` Andrew Zabolotny
2006-03-06 23:05 ` Richard Purdie
2006-03-08 9:48 ` Andrew Zabolotny
2006-03-06 21:44 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060306214758.GB4701@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=adaplas@gmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=zap@homelink.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).