From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH 3/3] spi: create an optional message queueing infrastructure Date: Thu, 2 Feb 2012 11:52:47 -0700 Message-ID: <20120202185247.GR15343@ponder.secretlab.ca> References: <1328187599-12982-1-git-send-email-linus.walleij@stericsson.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Viresh Kumar , Mark Brown , Linus Walleij To: Linus Walleij Return-path: Content-Disposition: inline In-Reply-To: <1328187599-12982-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Thu, Feb 02, 2012 at 01:59:59PM +0100, Linus Walleij wrote: > From: Linus Walleij > > This rips the message queue in the PL022 driver out and pushes > it into (optional) common infrastructure. Drivers that want to > use the message pumping thread will need to select the symbol > SPI_MASTER_QUEUE and implement three methods in place for the > current transfer() method. Most of the design is described in > the documentation changes that are included in this patch. > > Cc: Mark Brown > Signed-off-by: Linus Walleij This looks really good. In fact, can you think of any reason why we wouldn't force all spi drivers to use central queueing? I don't see any advantage in leaving the old mechanism in place other than to allow driver to transition from the old API. There is also the spi_bitbang which also implements its own message queue and workqueue. Several drivers make use of even if they don't do bitbanging. Can you investigate dropping patch 2 and making the normal register function set up queued transfers if the transfer hook is not set. If it is set, then make the kernel complain to the console, quietly at first, but we'll get louder before ultimately removing the non-queued interface. Thoughts? g. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d