Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Esben Haabendal
Chuanhua Han writes: >> I am using XSPI mode on LS1021A, talking to a lot of different SPI devices. >> And they all work, and I believe everything is quite "normal". >> > Since I don't have the board of LS1021, I can't test it. I use other boards > with DSPI (such as LS1043, LS2088, etc.), > and

RE: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Chuanhua Han
> -Original Message- > From: Esben Haabendal On Behalf Of Esben > Haabendal > Sent: 2018年10月9日 19:21 > To: Chuanhua Han > Cc: Boris Brezillon ; broo...@kernel.org; > linux-...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [PATCH 1/

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Esben Haabendal
Mark Brown writes: > On Tue, Oct 09, 2018 at 12:05:22PM +0200, Boris Brezillon wrote: >> On Tue, 9 Oct 2018 09:52:23 + >> Chuanhua Han wrote: > >> > 1. In the dspi driver (spi controller), bits_per_word >> > (dspi->bits_per_word = transfer->bits_per_word) passed from the upper >> > layer (sp

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Esben Haabendal
Chuanhua Han writes: >> -Original Message- >> From: Boris Brezillon >> Sent: 2018年10月9日 18:05 >> To: Chuanhua Han >> Cc: broo...@kernel.org; linux-...@vger.kernel.org; >> linux-kernel@vger.kernel.org; e...@deif.com >> Subject: Re: [PATCH 1

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Esben Haabendal
Chuanhua Han writes: > 1. In the dspi driver (spi controller), bits_per_word (dspi->bits_per_word = > transfer->bits_per_word) passed from the upper layer (spi-mem.c) is used. > In this way, I can only assign the appropriate value of > transfer->bits_per_word before passing to the controller, tha

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Mark Brown
On Tue, Oct 09, 2018 at 12:05:22PM +0200, Boris Brezillon wrote: > On Tue, 9 Oct 2018 09:52:23 + > Chuanhua Han wrote: > > 1. In the dspi driver (spi controller), bits_per_word > > (dspi->bits_per_word = transfer->bits_per_word) passed from the upper > > layer (spi-mem.c) is used. In this way

RE: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Chuanhua Han
> -Original Message- > From: Boris Brezillon > Sent: 2018年10月9日 18:05 > To: Chuanhua Han > Cc: broo...@kernel.org; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; e...@deif.com > Subject: Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function &g

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Boris Brezillon
On Tue, 9 Oct 2018 09:52:23 + Chuanhua Han wrote: > 1. In the dspi driver (spi controller), bits_per_word > (dspi->bits_per_word = transfer->bits_per_word) passed from the upper > layer (spi-mem.c) is used. In this way, I can only assign the > appropriate value of transfer->bits_per_word befo

RE: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-10-09 Thread Chuanhua Han
> -Original Message- > From: Boris Brezillon > Sent: 2018年9月28日 15:19 > To: Chuanhua Han > Cc: broo...@kernel.org; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; e...@deif.com > Subject: Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw functio

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-09-28 Thread Mark Brown
On Fri, Sep 28, 2018 at 09:18:33AM +0200, Boris Brezillon wrote: > 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 Yes, bits per word is

RE: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-09-28 Thread Chuanhua Han
> -Original Message- > From: Boris Brezillon > Sent: 2018年9月28日 15:19 > To: Chuanhua Han > Cc: broo...@kernel.org; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; e...@deif.com > Subject: Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw functio

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-09-28 Thread Boris Brezillon
On Fri, 28 Sep 2018 06:59:58 + 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 th

RE: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-09-28 Thread Chuanhua Han
HI,Boris, > -Original Message- > From: Boris Brezillon > Sent: 2018年9月28日 14:45 > To: Chuanhua Han > Cc: broo...@kernel.org; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; e...@deif.com > Subject: Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer

Re: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-09-27 Thread Boris Brezillon
Hi Chuanhua, On Fri, 21 Sep 2018 15:06:26 +0800 Chuanhua Han wrote: > Before we add this spi_transfer to the spi_message chain table, we need > bits_per_word_mask based on spi_control to set the bits_per_word of > this spi_transfer. It's not clear to me what you're trying to fix/improve. Can yo

RE: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function

2018-09-27 Thread Chuanhua Han
> -Original Message- > From: Chuanhua Han > Sent: 2018年9月21日 15:06 > To: broo...@kernel.org > Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; e...@deif.com; > boris.brezil...@bootlin.com; Chuanhua Han > Subject: [PATCH 1/2] spi: spi-mem: Add the spi_set_xfer_bpw function >