Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932363AbVLMQhz (ORCPT ); Tue, 13 Dec 2005 11:37:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932172AbVLMQhz (ORCPT ); Tue, 13 Dec 2005 11:37:55 -0500 Received: from smtp104.sbc.mail.mud.yahoo.com ([68.142.198.203]:24992 "HELO smtp104.sbc.mail.mud.yahoo.com") by vger.kernel.org with SMTP id S932363AbVLMQhy (ORCPT ); Tue, 13 Dec 2005 11:37:54 -0500 From: David Brownell To: dmitry pervushin , Rui Sousa Subject: Re: [spi-devel-general] Re: [PATCH 2.6-git 0/4] SPI core refresh Date: Tue, 13 Dec 2005 08:35:38 -0800 User-Agent: KMail/1.7.1 Cc: Vitaly Wool , Linux Kernel Mailing List , basicmark@yahoo.com, komal_shah802003@yahoo.com, stephen@streetfiresound.com, spi-devel-general@lists.sourceforge.net, Joachim_Jaeger@digi.com References: <20051212182026.4e393d5a.vwool@ru.mvista.com> <1134410498.12925.8.camel@localhost.localdomain> <1134475765.1590.2.camel@fj-laptop> In-Reply-To: <1134475765.1590.2.camel@fj-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512130835.38754.david-b@pacbell.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1214 Lines: 28 > On Mon, 2005-12-12 at 19:01 +0100, Rui Sousa wrote: > > How do you handle IRQ's generated by a SPI device (e.g ack the > > interrupt, check if it was the SPI device that generated the > > interrupt, ...) if you can't read/write on the SPI bus from interrupt > > context? I don't understand the question. The SPI controller may be busy handling transactions for a different device, so the best you could do from _any_ IRQ handler is to queue some messages that will get to the IRQ-issuing device sometime later. It's not possible to make the other transactions finish any faster, or abort them safely mid-transfer. The way the ads7846 driver handles it, for example, is to issue a transaction collecting a bunch of touchscreen sensor readings. And disable its (nonsharable) irq, since the interrupt will be raised for some time and there's no portable way for Linux to force the IRQ to trigger only on the relevant edge. See the 2.6.15-rc5-mm1 patches... - Dave - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/