From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a4493-0000z2-Cm for linux-mtd@lists.infradead.org; Wed, 02 Dec 2015 09:56:18 +0000 Received: by wmec201 with SMTP id c201so244736994wme.0 for ; Wed, 02 Dec 2015 01:55:55 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20151201195816.GS1929@sirena.org.uk> References: <8c34c7790244489c2ce0072c72bd9bc7c4cdb965.1448988089.git.hramrach@gmail.com> <20151201195816.GS1929@sirena.org.uk> From: Michal Suchanek Date: Wed, 2 Dec 2015 10:55:16 +0100 Message-ID: Subject: Re: [PATCH v5 08/10] spi: expose master transfer size limitation. To: Mark Brown Cc: Heiner Kallweit , 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 , MTD Maling List , Linux Kernel Mailing List , linux-spi Content-Type: text/plain; charset=UTF-8 List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 1 December 2015 at 20:58, Mark Brown wrote: > 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? Sorry, missed there is a patch because it shows in the middle of the discussion for me. I don't really care which one it is so long as I can get the last patch in this series based on it. Thanks Michal