From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Subject: Re: Why isn't IRQ shared for i2c-ocore Date: Fri, 8 May 2015 07:57:47 +0100 Message-ID: <20150508065747.GG16220@x1> References: <55304D8E.8070204@freescale.com> <55312AF7.7070504@freescale.com> <20150420064231.GE3447@x1> <55352839.70905@freescale.com> <20150420181651.GF3447@x1> <5535460B.2060309@freescale.com> <20150421073534.GK3447@x1> <554A8A8B.1020703@freescale.com> <20150507070149.GB3400@x1> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Geert Uytterhoeven Cc: York Sun , Julia Lawall , Linux I2C , wolfram-z923LK4zBo2bacvFa/9K2g@public.gmane.org, "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-i2c@vger.kernel.org On Fri, 08 May 2015, Geert Uytterhoeven wrote: > On Thu, May 7, 2015 at 9:01 AM, Lee Jones wrot= e: > >> I have a follow up question regarding interrupt. I see many I2C bu= s drivers > >> request interrupt with flag =3D 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 y= ou > > think it should be shared? You should only flag it as shared if it > > is. >=20 > However, that's something the driver can't know. > Sharing interrupts is an integration property. The same IP core may s= hare 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? --=20 Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org =E2=94=82 Open source software for ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752244AbbEHG5y (ORCPT ); Fri, 8 May 2015 02:57:54 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:34628 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612AbbEHG5w (ORCPT ); Fri, 8 May 2015 02:57:52 -0400 Date: Fri, 8 May 2015 07:57:47 +0100 From: Lee Jones To: Geert Uytterhoeven Cc: York Sun , Julia Lawall , Linux I2C , wolfram@the-dreams.de, "linux-kernel@vger.kernel.org" Subject: Re: Why isn't IRQ shared for i2c-ocore Message-ID: <20150508065747.GG16220@x1> References: <55304D8E.8070204@freescale.com> <55312AF7.7070504@freescale.com> <20150420064231.GE3447@x1> <55352839.70905@freescale.com> <20150420181651.GF3447@x1> <5535460B.2060309@freescale.com> <20150421073534.GK3447@x1> <554A8A8B.1020703@freescale.com> <20150507070149.GB3400@x1> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 08 May 2015, Geert Uytterhoeven wrote: > On Thu, May 7, 2015 at 9:01 AM, Lee Jones 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