[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E68CA15.8000504@ladisch.de>
Date: Thu, 08 Sep 2011 15:58:45 +0200
From: Clemens Ladisch <clemens@...isch.de>
To: Yong Zhang <yong.zhang0@...il.com>
CC: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...e.hu,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, Jiri Kosina <jkosina@...e.cz>,
Andreas Mohr <andi@...as.de>,
Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
Julia Lawall <julia@...u.dk>,
Ondrej Zary <linux@...nbow-software.org>,
Dan Carpenter <error27@...il.com>,
Joe Perches <joe@...ches.com>, alsa-devel@...a-project.org
Subject: Re: [RFC] [PATCH 02/62] mpu401:snd_mpu401_uart_new(): split semantic
of irq_flags
Yong Zhang wrote:
> On Thu, Sep 08, 2011 at 12:53:14PM +0200, Clemens Ladisch wrote:
>> Yong Zhang wrote:
>> > Now snd_mpu401_uart_new() parameter 'irq_flags' take two role
>> > in it: one is the condition to request_irq and the other is
>> > the real irq_flags which will be transfered to request_irq().
>> >
>> > So add another parameter 'want_irq' to take the role of the
>> > first one, this will make it easy to remove IRQF_DISABLED.
>>
>> Please note that the irq number is also intended to pass this
>> information:
>
> Yes.
>
> this is a bit subtle:
> * @irq: the irq number, -1 if no interrupt for mpu
>
> This semantic of 'irq' is kept by the callers IMHO.
>
> * @irq_flags: the irq request flags (SA_XXX), 0 if irq was already reserved.
>
> So irq_flags has other meaning--if the irq is already reserved.
> Maybe my imprecise description make some kind of misunderstanding.
The wording is just sloppy.
> BTW, I'm not familiar with mpu401, so maybe I'm missing something here.
The MPU-401 in UART mode is a very simple and stupid MIDI interface,
which is used on very many sound cards. Depending on the actual
hardware implementation, it gets its own interrupt which may be
exclusive or sharable, or it is integrated into the interrupt handling
of the main sound card which means that the sound driver has to call the
mpu401 interrupt handler explicitly.
Here, "no interrupt" and "already reserved" actually mean the same thing,
i.e., that the interrupt handling is the responsibility of some other
driver.
Regards,
Clemens
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists