public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: <balbi@ti.com>, Alexander Shiyan <shc_work@mail.ru>,
	<gregkh@linuxfoundation.org>, <jslaby@suse.cz>,
	<ning.li@intel.com>, <ivan.gorinov@intel.com>,
	<linux-kernel@vger.kernel.org>, <linux-serial@vger.kernel.org>
Subject: Re: [PATCH 2/2] mrst_max3110: fix SPI UART interrupt parameters
Date: Wed, 23 Oct 2013 13:33:34 -0500	[thread overview]
Message-ID: <20131023183334.GB29679@gimli> (raw)
In-Reply-To: <52681689.2090004@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]

Hi,

On Wed, Oct 23, 2013 at 11:33:45AM -0700, David Cohen wrote:
> On 10/23/2013 11:21 AM, Felipe Balbi wrote:
> >Hi,
> >
> >On Wed, Oct 23, 2013 at 11:10:48AM -0700, David Cohen wrote:
> >>>My idea is always use threaded irq and passing flags into request.
> >>>Like as:
> >>>unsigned long flags = res->flags & IORESOURCE_BITS;
> >>>...
> >>>request_threaded_irq(max->irq, serial_m3110_irq, IRQF_ONESHOT | flags, "max3110", max);
> >>
> >>
> >>Oh, maybe we were talking about different things afterall :)
> >>The reason this struct plat_max3110 was created is to allow platform
> >>code (located under arch/x86/platform/intel-mid/device_libs/) to define
> >>the irq edge type.
> >>When I saw your comment I though you were referring to struct resource
> >>(which has IORESOURCE_IRQ_* flags). But unlike platform_device,
> >>spi_device has no struct resource * to replace the need of struct
> >>plat_max3110.
> >>
> >>OTOH your suggestion can replace this piece of code:
> >>
> >>@@ -68,6 +69,7 @@ struct uart_max3110 {
> >>         u8 clock;
> >>         u8 parity, word_7bits;
> >>         u16 irq;
> >>+       u16 irq_edge_triggered;
> >
> >max3110 is already edge triggered:
> >
> >495                 ret = request_irq(max->irq, serial_m3110_irq,
> >496                                 IRQ_TYPE_EDGE_FALLING, "max3110", max);
> 
> Yeah. But in Merrifield case (at least the reference board used now)
> it's not edge triggered. I need this driver to support this situation
> prior to send mrst_max3110 platform code for it.

got it. Then why don't you use irq_set_irq_type() from platform code and
change that request_irq() into:

ret = request_threaded_irq(max->irq, NULL, serial_m3110_irq,
	IRQF_ONESHOT, "max3110", max);

if you call irq_set_irq_type() correctly, driver wouldn't need to know
the IRQ type.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2013-10-23 18:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 19:42 [PATCH 1/2] mrst_max3110: fix unbalanced IRQ issue during resume David Cohen
2013-10-22 19:42 ` [PATCH 2/2] mrst_max3110: fix SPI UART interrupt parameters David Cohen
2013-10-22 19:46   ` Alexander Shiyan
2013-10-22 20:30     ` David Cohen
2013-10-22 23:02       ` David Cohen
2013-10-23  6:27         ` Alexander Shiyan
2013-10-23 18:10           ` David Cohen
2013-10-23 18:21             ` Felipe Balbi
2013-10-23 18:23               ` Felipe Balbi
2013-10-23 18:38                 ` David Cohen
2013-10-23 18:33               ` David Cohen
2013-10-23 18:33                 ` Felipe Balbi [this message]

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=20131023183334.GB29679@gimli \
    --to=balbi@ti.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ivan.gorinov@intel.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=ning.li@intel.com \
    --cc=shc_work@mail.ru \
    /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