lkml.org 
[lkml]   [2008]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] rtc-dev: stop periodic interrupts on device release
    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

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2008-07-28 22:51    [W:0.025 / U:0.040 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site