Return-Path: Received: from mail-gx0-f157.google.com (mail-gx0-f157.google.com [209.85.217.157]) by ozlabs.org (Postfix) with ESMTP id B2F5DDDDA9 for ; Wed, 1 Apr 2009 08:38:22 +1100 (EST) Received: by gxk1 with SMTP id 1so9906591gxk.9 for ; Tue, 31 Mar 2009 14:38:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <9A8B45DD4DE17F4783430D784DA0B68811C429F9B7@HEXMBVS12.hostedmsx.local> References: <9A8B45DD4DE17F4783430D784DA0B68811C429F9B7@HEXMBVS12.hostedmsx.local> Date: Tue, 31 Mar 2009 15:38:20 -0600 Message-ID: Subject: Re: Interrupts on GPIO From: Grant Likely To: Yann Pelletier Content-Type: text/plain; charset=ISO-8859-1 Cc: "linuxppc-dev@ozlabs.org" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Mar 31, 2009 at 2:59 PM, Yann Pelletier wrote: >> Message: 7 >> Date: Mon, 30 Mar 2009 10:32:17 -0600 >> From: Grant Likely >> Subject: > To: Yann Pelletier >> Cc: "linuxppc-dev@ozlabs.org" >> Message-ID: >> =A0 =A0 =A0 >> Content-Type: text/plain; charset=3DISO-8859-1 >> >> On Mon, Mar 30, 2009 at 9:57 AM, Yann Pelletier >> wrote: >> > >> > Hi, >> > I'd like to add supports for interrupts handling from GPIO controller. >> ?Some of these interrupts are from I2C devices and some others are from >> SPI devices. >> > >> > What is the best approach to enable interrupts handling for those >> devices through GPIO. >> >> Modify the GPIO driver to also be a cascaded IRQ driver (see >> http://patchwork.ozlabs.org/patch/21914/ for an example). >> > > I've looked at the patch but I wonder if this would be applicable to the = MPC8313. =A0If my understanding is good, in the MPC52xx you have 8 gpio onl= y interrupts and 8 gpio/gpt. =A0With the MPC8313, each GPIO can act as an i= nterrupt but they are all muxed to only 1 interrupt in the IPIC. =A0So I'm = concern about making the GPIO controller act as an interrupt controller. Why? The situation really isn't any different. Using the GPIO controller hardware as a Linux interrupt controller means that other drivers can just use it without having to do anything special. It's just and IRQ. g. --=20 Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.