From: Zhang Rui <rui.zhang@intel.com>
To: "Zhao, Yakui" <yakui.zhao@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>,
Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALS devices
Date: Tue, 04 Aug 2009 15:30:01 +0800 [thread overview]
Message-ID: <1249371001.2670.375.camel@rzhang-dt> (raw)
In-Reply-To: <1249348343.3556.120.camel@localhost.localdomain>
On Tue, 2009-08-04 at 09:12 +0800, Zhao, Yakui wrote:
> On Mon, 2009-08-03 at 17:10 +0800, Zhang Rui wrote:
> > Hi, all,
> >
> > This is the patch set I made to introduce ACPI ALS device driver
> > and a generic sysfs I/F for all the ALS devices, like ACPI ALS,
> > platform ALS, etc.
> >
> > Patch 01 introduces the ACPI ALS device driver.
> Great jobs.
> But I still have two questions about the patch set.
> 1. _ALP polling method
> This optional object returns the recommended polling frequency for
> the ambient sensor. And OSPM can use the recommended polling frequency
> to poll the ambient sensor.
> Of course the spec 9.2.6 also says that the use of polling is allowed
> but strongly discouraged by this specification. In such case we had
> better not use the polling frequency. Instead it will totally depend on
> the async notification event.
> Can some message be printed that the polling frequency is depreciated
> when the _ALP is not zero?
In fact, currently the driver just follows ACPI spec to support _ALP
method for ACPI ALS device. But _ALP return value is not used at all.
As we don't have any platform that _ALP is actually implemented, why not
leave the code there for now. And a warning message is reasonable.
> 2. what is the ALS policy and how to use it?
> The main purpose of ambient sensor is to adjust the brightness
> according to the current luminance environment. From this patch set it
> seems that this will be done in user space. But it is not very clear how
> to adjust the brightness based on the current luminance.
> Can we describe it more clearly?
>
Generally, in order to make ALS work, user space needs to:
1. set an backlight value as the base point, i.e. the display brightness
level when the display luminance adjustment value is 100%.
2. when the ambient light illuminance changes, find a proper element in
/sys/class/als/als0/mappings, and get the display adjustment value.
3. use this adjustment value to get the proper display brightness
level and set it via the backlight sysfs I/F.
I'll add the ALS documentation to describe how to use this sysfs I/F,
if the current approach is accepted. :)
>
> Another little issue is the memory leak in the patch 1.
> When it receives the notification event(0x82), it will re-evaluate the
> mapping between brightness and luminance. The memory space occupied by
> previous mapping should be freed.
>
good catch.
refreshed patch has been sent out.
thanks,
rui
next prev parent reply other threads:[~2009-08-04 7:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 9:10 Zhang Rui
2009-08-04 1:12 ` ykzhao
2009-08-04 7:30 ` Zhang Rui [this message]
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
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=1249371001.2670.375.camel@rzhang-dt \
--to=rui.zhang@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.net \
--cc=yakui.zhao@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
all inboxes | Powered by JetHome®