Re: [PATCH 0/3] Generic sysfs support for ACPI ALS and other ALSdevices

From: Pavel Machek
Date: Thu Aug 06 2009 - 05:53:14 EST


Hi!

> > Yes, so just export
> >
> > ALS exports
> > 1. the current ambient light illuminance
> > 2. the current mapped ambient light illuminance
> >
> In fact, only one attribute is enough.

Good. (I thought you would want to export the 1) too, mainly for debugging).

> The ALS driver can query the current illuminance, parse the mapping and
> only export the display luminance adjustment values to user space.

> then user space just needs to
> 1. set a brightness level as the base point
> 2. get the display adjustment value and calculate a proper brightness
> level at any time.
>
> this is easier, but it makes me feel that this doesn't look like an
> _ALS_ device any more.
> We still should export some ALS properties to user space, shouldn't
> we?

Why? Just because ACPI specs is ugly does not mean we should make
Linux ugly, too. Please just use suggestion above.

> 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.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/