Re: [PATCH] backlight dimmer

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Arjan van de Ven <arjan@...>
Cc: lists@antonello.org <lists@...>, Samuel Tardieu <sam@...>, <linux-kernel@...>
Date: Sunday, October 28, 2007 - 6:09 pm

Arjan van de Ven wrote:

hi,

i don't think there are similar infrastructures. This timeout is
not quite a timer.

The timeout starts counting when timeout_touch() is first called. At
this point the start() function is executed in non-atomic context.
Then either it is reset if timeout_touch() is called in time (and
thus starts to count again). Else it triggers, and executes the
trigger() function in non-atomic context and it stays idle unless
timeout_touch() is called again.

The non-atomic context is needed to use backlight.c mutexes and
that is enabled with the use of workqueues.

I don't mean to add some new infrastructure to the base kernel, but
it seemed a general functionality to me. In fact it may also be fully
included in backlight.c. Since backlight.h is in include/linux, i was
forced to put timeout.h in include/linux also. But this is just
a temporary fix.

jacopo

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] backlight dimmer, Samuel Tardieu, (Sun Oct 28, 12:15 pm)
Re: [PATCH] backlight dimmer, lists@antonello.org, (Sun Oct 28, 5:30 pm)
Re: [PATCH] backlight dimmer, Arjan van de Ven, (Sun Oct 28, 5:34 pm)
Re: [PATCH] backlight dimmer, , (Sun Oct 28, 6:09 pm)