From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Miao Subject: Re: Using PXA arm board with MAX7319 GPIO expander input Date: Tue, 9 Feb 2010 16:19:18 +0800 Message-ID: References: <20100208113306.GN9007@buzzloop.caiaq.de> <6a1db73cb6c89001764393acd766f2ba.squirrel@www.loen.fr> <20100209073903.4d8a00e4@taxman.wild-wind.fr.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20100209073903.4d8a00e4@taxman.wild-wind.fr.eu.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Marc Zyngier Cc: Jebediah Huang , linux-arm-kernel@lists.infradead.org, Daniel Mack , linux-input@vger.kernel.org List-Id: linux-input@vger.kernel.org On Tue, Feb 9, 2010 at 3:39 PM, Marc Zyngier wrote: > On Tue, 9 Feb 2010 09:05:22 +0800 > Eric Miao wrote: > >> On Mon, Feb 8, 2010 at 8:32 PM, Marc Zyngier wrote: >> >> I just saw that there is indeed no support for irq line handling in this >> >> driver. In order to use these lines as input for something like the >> >> gpio_keys driver, support for that should be added. I never used this >> >> driver and can't say whether it is under active development. >> > >> > It should be rather easy to introduce something similar to what I did for >> > the pca953x driver (http://patchwork.kernel.org/patch/77418/) >> > >> > MAX732x seems a lot saner than PCA953x, as it has at least a hardware >> > interrupt mask... >> >> Well, I'd say max732x is a chip of heavy simplification, input/output direction >> of each pin is normally hardcoded, depending on the chip model used, there >> seems no such interrupt mask registers for SW use really. > > I'm currently staring at the max7319 datasheet, and it really looks > like there is such a register: > > "All input ports are continuously monitored for state changes > (transition detection). Transitions are latched, allowing detection of > transient changes. Any combination of inputs can be selected using the > interrupt mask to assert the INT output. When the MAX7319 is > subsequently accessed through the serial interface, any pending > interrupt is cleared." > > So it would seems (although I agree with you that max732x as a GPIO > expander is grossly simplified) that the feature is at least advertised. > That sounds like a good news. I'm seeing your previous implementation of interrupt support on pca953x as a good one, so probably would be good to follow that, and not sure Jebediah Huang can have this tested :-)