public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alessandro Zummo <alessandro.zummo@towertech.it>
To: "Tomáš Janoušek" <tomi@nomi.cz>
Cc: David Brownell <david-b@pacbell.net>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] rtc-dev: stop periodic interrupts on device release
Date: Mon, 28 Jul 2008 22:47:40 +0200	[thread overview]
Message-ID: <20080728224740.5a7a1b3e@i1501.lan.towertech.it> (raw)
In-Reply-To: <20080728204136.GA6683@nomi.cz>

On Mon, 28 Jul 2008 22:41:36 +0200
Tomáš Janoušek <tomi@nomi.cz> wrote:

> 
> From: Tomas Janousek <tomi@nomi.cz>
> Date: Sat, 26 Jul 2008 16:23:36 +0100
> Subject: [PATCH] rtc-dev: stop periodic interrupts on device release
> 
> Solves http://bugzilla.kernel.org/show_bug.cgi?id=11127
> 
> The old rtc.c driver did it and some drivers (like rtc-sh) do it in their
> release function, though they should not -- because they should provide the
> irq_set_state op and the rtc framework itself should care about it. This patch
> makes it do so.
> 
> I am aware that some drivers, like rtc-sh, handle userspace PIE sets in their
> ioctl op (instead of having the framework call the op), exporting the
> irq_set_state op at the same time. The logic in rtc_irq_set_state should make
> sure it doesn't matter and the driver should not need to care stopping periodic
> interrupts in its release routine any more.
> 
> The correct way, in my opinion, should be this:
> 1) The driver provides the irq_set_state op and does not care closing the
>    interrupts in its release op.
> 2) If the driver does not provide the op and handles PIE in the ioctl op, it's
>    reponsible for closing them in its release op.
> 3) Something similar for other IRQs, like UIE -- if there's no in-kernel API
>    like irq_set_state, handle it in ioctl and release ops. The framework will
>    be responsible either for everything or for nothing.
> 
> Signed-off-by: Tomas Janousek <tomi@nomi.cz>
> Acked-by: David Brownell <dbrownell@users.sourceforge.net>

 ok, that's fair.

 Acked-by: Alessandro Zummo <a.zummo@towertech.it>

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it


  reply	other threads:[~2008-07-28 20:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-26 15:46 [PATCH] rtc-dev: stop periodic interrupts on device release Tomas Janousek
2008-07-26 17:55 ` Alessandro Zummo
2008-07-26 18:06   ` Tomáš Janoušek
2008-07-26 18:13     ` Alessandro Zummo
2008-07-26 19:58       ` David Brownell
2008-07-26 20:50 ` David Brownell
2008-07-27  3:03   ` Mike Frysinger
2008-07-27  5:03     ` David Brownell
2008-07-28 20:41   ` Tomáš Janoušek
2008-07-28 20:47     ` Alessandro Zummo [this message]
2008-07-28 22:05     ` David Brownell
2008-07-28 23:36       ` Tomáš Janoušek
2008-07-29 20:08         ` David Brownell

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=20080728224740.5a7a1b3e@i1501.lan.towertech.it \
    --to=alessandro.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomi@nomi.cz \
    /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