public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jack@antonello.org
To: Arjan van de Ven <arjan@infradead.org>
Cc: "lists@antonello.org" <lists@antonello.org>,
	Samuel Tardieu <sam@rfc1149.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] backlight dimmer
Date: Sun, 28 Oct 2007 23:09:53 +0100	[thread overview]
Message-ID: <472508B1.4000809@antonello.org> (raw)
In-Reply-To: <20071028143445.4617efd8@laptopd505.fenrus.org>

Arjan van de Ven wrote:
> On Sun, 28 Oct 2007 22:30:55 +0100
> "lists@antonello.org" <lists@antonello.org> wrote:
> 
>> Ok,
>>   now checkpatch.pl only complains about a missing signed-off-by.
>> Is this ok for review?
> 
> 
> hi,
> 
> when going over your patch.. is there a reason you introduce yet
> another timeout infrastructure? Is there something wrong with the
> existing ones that maybe should be fixed instead?
> Either way.. please put justification for such new mechanism in the
> patch changelog....
> 
> Greetings,
>    Arjan van de Ven
> 

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


  reply	other threads:[~2007-10-28 22:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28 16:10 [PATCH] backlight dimmer jack
2007-10-28 16:15 ` Samuel Tardieu
2007-10-28 21:30   ` lists
2007-10-28 21:34     ` Arjan van de Ven
2007-10-28 22:09       ` jack [this message]
2007-10-30 14:48 ` Pavel Machek
2007-11-01 23:18   ` jack

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=472508B1.4000809@antonello.org \
    --to=jack@antonello.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lists@antonello.org \
    --cc=sam@rfc1149.net \
    /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