Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757028AbbLAVIJ (ORCPT ); Tue, 1 Dec 2015 16:08:09 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:36110 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756889AbbLAVIG (ORCPT ); Tue, 1 Dec 2015 16:08:06 -0500 Subject: Re: [PATCH v5 08/10] spi: expose master transfer size limitation. To: Mark Brown , Michal Suchanek References: <8c34c7790244489c2ce0072c72bd9bc7c4cdb965.1448988089.git.hramrach@gmail.com> <20151201195816.GS1929@sirena.org.uk> Cc: David Woodhouse , Brian Norris , Han Xu , Boris Brezillon , Javier Martinez Canillas , Stephen Warren , "Andrew F. Davis" , Marek Vasut , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Mika Westerberg , Gabor Juhos , =?UTF-8?B?QmVhbiBIdW8g6ZyN5paM5paM?= , Furquan Shaikh , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org From: Heiner Kallweit Message-ID: <565E0C2B.4070504@gmail.com> Date: Tue, 1 Dec 2015 22:07:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151201195816.GS1929@sirena.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1618 Lines: 36 Am 01.12.2015 um 20:58 schrieb Mark Brown: > On Tue, Dec 01, 2015 at 04:51:06PM -0000, Michal Suchanek wrote: >> On some SPI controllers it is not feasible to transfer arbitrary amount >> of data at once. >> >> When the limit on transfer size is a few kilobytes at least it makes >> sense to use the SPI hardware rather than reverting to gpio driver. > >> + /* >> + * on some hardware transfer size may be constrained >> + * the limit may depend on device transfer settings >> + */ >> + size_t (*max_transfer_size)(struct spi_device *spi); > > Heiner submitted a *very* similar patch just now with a straight > variable plus accessor instead of a function and using a name with _msg. > I'm ambivalent on the implementation but prefer the naming here since > that's more the limitation we're trying to express I think (some > hardware does have limiations about multple transfers too). Can the two > of you come up with something that works for both of you? > Sure .. Just one inquiry: When you say "the naming here" you refer to Michal's or my version? Actually I like in Michal's hook that it directly takes a struct spi_device. This saves the caller one level of indirection as the caller usually will deal with a spi_device and not a spi_master. If you're fine with Michal's version then this is also fine with me, especially as the functionality is the same. -- 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/