From: David Brownell Subject: Re: [PATCH] spi: add a bits_per_word to struct spi_board_info Date: Wed, 1 Sep 2010 22:23:33 -0700 (PDT) Message-ID: <930634.1250.qm@web180310.mail.gq1.yahoo.com> References: <20100902100128.5d5b7d87@feng-i7> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" To: Feng Tang Return-path: In-Reply-To: <20100902100128.5d5b7d87@feng-i7> 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 Wed, 9/1/10, Feng Tang wrote: > > > > What's the case where platform code could > > know "better" than the driver? > > Grant also asked me the same question. I saw him ask a different question (which I quoted) ... Yes, driver itself > know the bits_per_word info best in most case, but there > is > some device (Option GTM501L spi modem) which supports > multiple > bits_per_mode option, and here platform code is the good place to set it. Not unless it knows which mode the driver uses... a kind of layering violation. > > So if we can set it before > registering board info, then the second spi_setup can be > removed for many drivers. that doesn't seem to me like it'd be a startup cost that's easily observed; hard for me to worry about it, but I can see what you mean. ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd