From: Pavel Machek <pavel@ucw.cz>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Len Brown <lenb@kernel.org>, Richard Purdie <rpurdie@rpsys.net>,
Matthew Garrett <mjg59@srcf.ucam.org>, Greg KH <greg@kroah.com>
Subject: Re: [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALS devices
Date: Thu, 6 Aug 2009 09:13:54 +0200 [thread overview]
Message-ID: <20090806071353.GB21847@elf.ucw.cz> (raw)
In-Reply-To: <1249522879.2670.480.camel@rzhang-dt>
> > > No,
> > > For a ALS policy, user space should set a brightness level as the base
> > > point, i.e. the backlight when display adjustment is 100.
> > > and then uses the adjustment values gotten from this mappings to
> > > calculate the actual brightness level the display should be put in.
> >
> > Ok, so just make the code return only the "adjustement" -- userspace
> > does not really need to know "illuminance" and you can do the mapping
> > in the kernel AFAICT.
> >
>
> ALS exports
> 1. the current ambient light illuminance
> 2. the mappings
>
> Backlight device exports
> 1. the brightness levels.
>
> User space needs to:
> 1. set a brightness level as the base point
> 2. read the current ambient light illuminance from ALS device
> 3. read the ambient light illuminance to display adjustment mappings
> 4. calculate a proper brightness level we should set.
>
> For example, if we set brightness 6 as the default brightness, i.e. the
> brightness level when ambient light illuminance is 300.
> Now we walk outdoors, and the current illuminance is 1000,
> then we should set the new_brightness_level to (6 * 150%)
Yes, so just export
ALS exports
1. the current ambient light illuminance
2. the current mapped ambient light illuminance
Backlight device exports
1. the brightness levels.
User space needs to:
1. set a brightness level as the base point
2. read the current mapped ambient light illuminance from ALS device
3. calculate a proper brightness level we should set.
You get
a) nicer interface
b) simpler userland
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-08-06 7:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 9:10 [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALS devices Zhang Rui
2009-08-04 1:12 ` ykzhao
2009-08-04 7:30 ` Zhang Rui
2009-08-04 13:21 ` Pavel Machek
2009-08-04 15:10 ` Greg KH
2009-08-04 17:24 ` Valdis.Kletnieks
2009-08-04 17:36 ` Greg KH
2009-08-05 1:04 ` Zhang Rui
2009-08-05 16:10 ` Valdis.Kletnieks
2009-08-06 1:51 ` Zhang Rui
2009-08-05 0:55 ` Zhang Rui
2009-08-05 1:02 ` Zhang Rui
2009-08-05 16:19 ` Pavel Machek
2009-08-06 1:41 ` Zhang Rui
2009-08-06 7:13 ` Pavel Machek [this message]
2009-08-06 8:47 ` Zhang Rui
2009-08-06 9:52 ` Pavel Machek
2009-08-17 8:32 ` Zhang Rui
2009-08-21 11:51 ` Pavel Machek
2009-08-25 1:13 ` Zhang Rui
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=20090806071353.GB21847@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=greg@kroah.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=rpurdie@rpsys.net \
--cc=rui.zhang@intel.com \
/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