lkml.org 
[lkml]   [2009]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALS devices
From
Date
On Fri, 2009-08-21 at 19:51 +0800, Pavel Machek wrote:
> Hi!
>
> > > > Could you please look at the documentation about ALS sysfs class in the
> > > > patch I sent out just now, and comment on that one please? thanks!
> > >
> > > I did. The interface is too ugly to live.
> >
> > Hi, Pavel,
> >
> > I tried to convert the ALS sysfs I/F to two attributes only, i.e.
> > illuminance and adjustment.
> > But I found several potential problems.
> > 1. the illuminance to display adjustment mappings can not be convert to
> > a brightness level smoothly.
> > for example,
> > illuminance adjustment
> > 1 600 70
> > 2 900 100
> > 3 1500 120
> > when the current illuminance is not one of the values listed in the
> > mappings, e.g. 750, the ALS driver don't have enough knowledge to get
> > the proper display adjustment, especially that a proper display
> > adjustment would be easy to select a proper brightness level.
> > We'd better leave this to user space, which is more flexible.
>
> Well, what interpolation does ACPI specs suggest to do?

Well, the spec says that "Extrapolation of the values between
these points is OS-specific", and it uses a piecewise linear
approximation in an example.

> Maybe it is
> easier to have linear interpolation in the kernel than to have ugly
> 20-file interface?

yes. we can do that.
refreshed patch will be sent out later.

thanks,
rui


--
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: 2009-08-25 03:17    [W:0.119 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site