Re: [PATCH] backlight dimmer

From: Pavel Machek
Date: Thu Nov 01 2007 - 10:33:54 EST


On Sun 2007-10-28 17:10:53, jack@xxxxxxxxxxxxx wrote:
> Hello,
> this patch implements a macbook like backlight dimmer on
> top of backlight.c.
>
> The dimmer is entirely in kernelspace and is suitable
> for an embedded context in order to avoid the overhead
> of a daemon controlling the backlight. Implementing this
> functionality in userspace has other advantages and is a
> perfectly reasonable alternative, so this patch is
> not the definitive solution.
>
> activate dimmer:
> echo 1 > /sys/devices/virtual/backlight/*/dimmer_control
>
> other attributes (britness levels & timeout):
> /sys/devices/virtual/backlight/*/dimmer_high_level
> /sys/devices/virtual/backlight/*/dimmer_low_level
> /sys/devices/virtual/backlight/*/dimmer_timeout

I'd say that userspace makes sense here. I'd want backlight to go down
slowly, for example.

But... maybe undimming should be done in kernel, so it keeps
low,latency?

Hmm, maybe existing screen blanking infrastructure can be reused?

> --- linux-2.6.23.1/include/linux/backlight.h 2007-10-12
> 18:43:44.000000000 +0200
> +++ b/include/linux/backlight.h 2007-10-28
> 13:45:21.000000000 +0100
> @@ -11,6 +11,7 @@
> #include <linux/device.h>
> #include <linux/mutex.h>
> #include <linux/notifier.h>
> +#include <linux/timeout.h>
>
> /* Notes on locking:

Your mail client damages patches?

--
(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/