All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: York Sun <yorksun-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org>,
	Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Why isn't IRQ shared for i2c-ocore
Date: Fri, 8 May 2015 07:57:47 +0100	[thread overview]
Message-ID: <20150508065747.GG16220@x1> (raw)
In-Reply-To: <CAMuHMdWXFmPWsL4QyjwV+X-mruS0pU2Uzj7aSSxTQDJ=K+32XA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, 08 May 2015, Geert Uytterhoeven wrote:

> On Thu, May 7, 2015 at 9:01 AM, Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> >> I have a follow up question regarding interrupt. I see many I2C bus drivers
> >> request interrupt with flag = 0. Why not using IRQF_SHARED?
> >
> > Probably because that particular IRQ is only used by the I2C
> > Controller.  I'm not exactly sure that you're getting at?  Why do you
> > think it should be shared?  You should only flag it as shared if it
> > is.
> 
> However, that's something the driver can't know.
> Sharing interrupts is an integration property. The same IP core may share its
> interrupt on one SoC, and not on another.

I guess that would depend on the IP.  If this is part of an MFD, you'd
know if you only hand a single interrupt line coming into the chip or
not.  If the IP can be moved around (copy & pasted) into different
chips, then yes, that might change.

How does one share an interrupt with other drivers if all them don't
know the IRQ is shared thought?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: York Sun <yorksun@freescale.com>,
	Julia Lawall <Julia.Lawall@lip6.fr>,
	Linux I2C <linux-i2c@vger.kernel.org>,
	wolfram@the-dreams.de,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Why isn't IRQ shared for i2c-ocore
Date: Fri, 8 May 2015 07:57:47 +0100	[thread overview]
Message-ID: <20150508065747.GG16220@x1> (raw)
In-Reply-To: <CAMuHMdWXFmPWsL4QyjwV+X-mruS0pU2Uzj7aSSxTQDJ=K+32XA@mail.gmail.com>

On Fri, 08 May 2015, Geert Uytterhoeven wrote:

> On Thu, May 7, 2015 at 9:01 AM, Lee Jones <lee.jones@linaro.org> wrote:
> >> I have a follow up question regarding interrupt. I see many I2C bus drivers
> >> request interrupt with flag = 0. Why not using IRQF_SHARED?
> >
> > Probably because that particular IRQ is only used by the I2C
> > Controller.  I'm not exactly sure that you're getting at?  Why do you
> > think it should be shared?  You should only flag it as shared if it
> > is.
> 
> However, that's something the driver can't know.
> Sharing interrupts is an integration property. The same IP core may share its
> interrupt on one SoC, and not on another.

I guess that would depend on the IP.  If this is part of an MFD, you'd
know if you only hand a single interrupt line coming into the chip or
not.  If the IP can be moved around (copy & pasted) into different
chips, then yes, that might change.

How does one share an interrupt with other drivers if all them don't
know the IRQ is shared thought?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  parent reply	other threads:[~2015-05-08  6:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  0:02 Need some guidance on i2c-ocores driver York Sun
     [not found] ` <55304D8E.8070204-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-04-17 15:47   ` York Sun
2015-04-17 15:47     ` York Sun
     [not found]     ` <55312AF7.7070504-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-04-20  6:42       ` Lee Jones
2015-04-20  6:42         ` Lee Jones
2015-04-20 16:24         ` York Sun
2015-04-20 16:24           ` York Sun
2015-04-20 18:16           ` Lee Jones
2015-04-20 18:31             ` York Sun
2015-04-20 18:31               ` York Sun
     [not found]               ` <5535460B.2060309-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2015-04-21  7:35                 ` Lee Jones
2015-04-21  7:35                   ` Lee Jones
2015-05-06 21:41                   ` Why isn't IRQ shared for i2c-ocore York Sun
2015-05-06 21:41                     ` York Sun
2015-05-07  7:01                     ` Lee Jones
2015-05-07 14:46                       ` York Sun
2015-05-07 14:46                         ` York Sun
2015-05-08  6:47                       ` Geert Uytterhoeven
     [not found]                         ` <CAMuHMdWXFmPWsL4QyjwV+X-mruS0pU2Uzj7aSSxTQDJ=K+32XA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-08  6:57                           ` Lee Jones [this message]
2015-05-08  6:57                             ` Lee Jones
2015-05-08  7:07                             ` Geert Uytterhoeven
2015-05-08  7:07                               ` Geert Uytterhoeven
2015-05-08  7:27                               ` Lee Jones
2015-05-08  8:03                                 ` Geert Uytterhoeven
2015-05-08  8:03                                   ` Geert Uytterhoeven

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=20150508065747.GG16220@x1 \
    --to=lee.jones-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=Julia.Lawall-L2FTfq7BK8M@public.gmane.org \
    --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    --cc=yorksun-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.