Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp420975imm; Fri, 28 Sep 2018 00:20:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ySQzPTr+/8DylirZ5wGBmlN0NmI7jo7bCeYaEZkqCqxW2Plp27cbq2mnOw1+9yE/IDczG X-Received: by 2002:a63:1c1b:: with SMTP id c27-v6mr13432859pgc.351.1538119250642; Fri, 28 Sep 2018 00:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538119250; cv=none; d=google.com; s=arc-20160816; b=PMAjlWCydzmTm/l48eHoB+ENw03hnQHyPZloHkaMNtP9i6HgdhzxdmvH7WMtwwXEg4 4VGqyNChaStrXf+/hnVpgV6D6GWgq3GB9VsR9BapnFQ1aY00pHRqEjWrh9yK10nQk8Cu C0G2kOtcXVzC7s6SFWc99P7w83nasZ6k4Yyg43B7UrYa/kHxSClFsIx21chGDnWsKw96 7kj3dWgTSR3J8E8QAHD2IAdfitjUHDD4s0wogKHs9NmSDcvZuGYVlTP0n+N4U8TXRPN5 wSFE923dWCSd0AiS4pmX26UwA1IhjfxuBV7S4Syyoloxkss8xUGHijJSDE7/DPtJXAp4 X7Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6JAb2vpflBUjPCtmonyJq7oMoCd/NxQCjLrX+Pcec08=; b=JnyychSTux6JQ6jkIs0Qu7h8DJYpdywx3rhH+HfJualGuSwjXe6knBJRqW9yOeSpLi BvfCWZ8R0znDYWQhXCzvpYg6fxZDv0pS+oG8F4LD0T1GSBE8NffJC6dEx4b9FypkVGka JOI4LB7y4WgpWWE6vWsitzw36H6E2aoY/2PO+wYMoSyMwU4Af47TmTQkTPygNg8P82ZZ ItvMhdqYifR2cSr/Bi6u4SqLt/qfkcFG4m/QUF2skXrQQ5gGIfn6+SFzNOrox92CJQ1I IcvlGMuHxpYXcoyhKEsx25jE6QgoFQSo5ROlVuhKHAcqePKg0TokB47jXdB0KtcQDNIX 67wg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si4177462plb.249.2018.09.28.00.20.34; Fri, 28 Sep 2018 00:20:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728944AbeI1NlX (ORCPT + 99 others); Fri, 28 Sep 2018 09:41:23 -0400 Received: from mail.bootlin.com ([62.4.15.54]:45091 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbeI1NlX (ORCPT ); Fri, 28 Sep 2018 09:41:23 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 4369C20711; Fri, 28 Sep 2018 09:18:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [176.187.87.154]) by mail.bootlin.com (Postfix) with ESMTPSA id 2A65620AB1; Fri, 28 Sep 2018 09:18:33 +0200 (CEST) Date: Fri, 28 Sep 2018 09:18:33 +0200 From: Boris Brezillon To: Chuanhua Han Cc: "broonie@kernel.org" , "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "eha@deif.com" Subject: Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function Message-ID: <20180928091833.15e95f7f@bbrezillon> In-Reply-To: References: <20180921070628.35153-1-chuanhua.han@nxp.com> <20180928084431.300b7bf9@bbrezillon> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Sep 2018 06:59:58 +0000 Chuanhua Han wrote: > > > > It's still unclear why you need to specify a bits_per_word value, > > but if this is needed, it's probably something you want to add to > > spi.c, when a message is queued. > To specify a specific bits_per_word to be able to use the xspi > (32bit) mode of the fsl_dspi module to transfer data, you can look at > my PATCH 2/2. Do not add a value in spis.c that takes into account > that the value assigned to bits_per_word is decided before the > transfer. Thanks for your check and reply! I might be wrong, but that's not my understanding of ->bits_per_word. To me, it's something that you can use when your *device* (not controller) expects non-byte aligned words [1]. The spi-mem protocol is definitely designed to work with 1byte large words, so, as I said, I suspect you're abusing xfer->bits_per_word to address a controller driver issue. [1]https://elixir.bootlin.com/linux/latest/source/include/linux/spi/spi.h#L114